Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
camelCase: Converted code in tests directory
[xestiacalendar/.git] / source / tests / xestiacalendar_icaleventsave.h
index 5686d3c..fd1a193 100644 (file)
@@ -1,14 +1,14 @@
 // xestiacalendar_icaleventsave.h - Xestia Calendar iCalendar Event Component Save Unit Tests
 //
-// (c) 2016 Xestia Software Development.
+// (c) 2016-2017 Xestia Software Development.
 //
 // This file is part of Xestia Calendar.
 //
-// Xestia Address Book is free software: you can redistribute it and/or modify
+// Xestia Calendar is free software: you can redistribute it and/or modify
 // it under the terms of the GNU General Public License as published by the
 // Free Software Foundation, version 3 of the license.
 //
-// Xestia Address Book is distributed in the hope that it will be useful,
+// Xestia Calendar is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 // GNU General Public License for more details.
 
 TEST(iCalendarSaveEvent, SaveEventTests){
 
-       CalendarEventObject TestEvent;
-       CalendarEventObject TestEvent2;
-       CalendarEventObject TestEvent3;
+       CalendarEventObject testEvent;
+       CalendarEventObject testEvent2;
+       CalendarEventObject testEvent3;
        
        // Load the test event.
        
-       ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestEvent.LoadFile("iCalendarEvent-Load1.vcf"));
-       ASSERT_EQ(CALENDAROBJECTVALID_OK, TestEvent.ValidBaseObject());
+       ASSERT_EQ(CALENDAROBJECTLOAD_OK, testEvent.LoadFile("iCalendarEvent-Load1.vcf"));
+       ASSERT_EQ(CALENDAROBJECTVALID_OK, testEvent.ValidBaseObject());
        
-       //ASSERT_EQ(CALENDAROBJECTSAVE_MISSING, TestEvent.LoadFile("iCalendarEvent-Missing.vcf"));
-       //ASSERT_EQ(CALENDAROBJECTSAVE_CANNOTOPEN, TestEvent.LoadFile("iCalendarEvent-InvalidPermissions.vcf"));
-       //ASSERT_EQ(CALENDAROBJECTSAVE_OK, TestEvent.LoadFile("iCalendarEvent-Load1.vcf"));
+       //ASSERT_EQ(CALENDAROBJECTSAVE_MISSING, testEvent.LoadFile("iCalendarEvent-Missing.vcf"));
+       //ASSERT_EQ(CALENDAROBJECTSAVE_CANNOTOPEN, testEvent.LoadFile("iCalendarEvent-InvalidPermissions.vcf"));
+       //ASSERT_EQ(CALENDAROBJECTSAVE_OK, testEvent.LoadFile("iCalendarEvent-Load1.vcf"));
 
-       ASSERT_EQ(CALENDAROBJECTSAVE_CANNOTOPEN, TestEvent.SaveFile("/stupidfilelocation/dontsavehere.ics"));
+       ASSERT_EQ(CALENDAROBJECTSAVE_CANNOTOPEN, testEvent.SaveFile("/stupidfilelocation/dontsavehere.ics"));
        
        // Save the data to a string and compare the data.
 
        // First contact file.
        
-       std::string SaveDataComparison = "BEGIN:VCALENDAR\n"
+       std::string saveDataComparison = "BEGIN:VCALENDAR\n"
        "VERSION:2.0\n"
        "METHOD;EXAMPLE=DATA:REQUEST\n"
        "CALSCALE;MORE=YES:GREGORIAN\n"
@@ -55,19 +55,19 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "END:VEVENT\n"
        "END:VCALENDAR";
        
-       std::string SaveData;
+       std::string saveData;
        
-       TestEvent.SaveString(&SaveData);
+       testEvent.SaveString(&saveData);
        
-       ASSERT_EQ(SaveDataComparison, SaveData);
+       ASSERT_EQ(saveDataComparison, saveData);
 
        // Process the second calendar item.
 
-       ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestEvent2.LoadFile("iCalendarEvent-Load2.vcf"));
-       ASSERT_EQ(CALENDAROBJECTVALID_OK, TestEvent2.ValidBaseObject());
+       ASSERT_EQ(CALENDAROBJECTLOAD_OK, testEvent2.LoadFile("iCalendarEvent-Load2.vcf"));
+       ASSERT_EQ(CALENDAROBJECTVALID_OK, testEvent2.ValidBaseObject());
 
-       SaveData.clear();
-       SaveDataComparison = "BEGIN:VCALENDAR\n"
+       saveData.clear();
+       saveDataComparison = "BEGIN:VCALENDAR\n"
        "VERSION:2.0\n"
        "PRODID:-//Xestia//Calendar Unit Testing//KW\n"
        "BEGIN:VEVENT\n"
@@ -194,16 +194,16 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "END:VEVENT\n"
        "END:VCALENDAR";
 
-       TestEvent2.SaveString(&SaveData);
+       testEvent2.SaveString(&saveData);
        
-       ASSERT_EQ(SaveDataComparison, SaveData);
+       ASSERT_EQ(saveDataComparison, saveData);
        
-       ASSERT_EQ(CALENDAROBJECTLOAD_OK, TestEvent3.LoadFile("iCalendarEvent-Load3.vcf"));
-       ASSERT_EQ(CALENDAROBJECTVALID_OK, TestEvent3.ValidBaseObject());
+       ASSERT_EQ(CALENDAROBJECTLOAD_OK, testEvent3.LoadFile("iCalendarEvent-Load3.vcf"));
+       ASSERT_EQ(CALENDAROBJECTVALID_OK, testEvent3.ValidBaseObject());
 
-       SaveData.clear();
+       saveData.clear();
 
-       SaveDataComparison = "BEGIN:VCALENDAR\n"
+       saveDataComparison = "BEGIN:VCALENDAR\n"
        "VERSION:2.0\n"
        "PRODID:-//Xestia//Calendar Unit Testing//KW\n"
        "BEGIN:VEVENT\n"
@@ -214,8 +214,8 @@ TEST(iCalendarSaveEvent, SaveEventTests){
        "END:VEVENT\n"
        "END:VCALENDAR";
 
-       TestEvent3.SaveString(&SaveData);
+       testEvent3.SaveString(&saveData);
 
-       ASSERT_EQ(SaveDataComparison, SaveData);
+       ASSERT_EQ(saveDataComparison, saveData);
 
 }
\ No newline at end of file
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy