AddCalendarTest.AddAccount("Test Account 1");
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
}
AddCalendarTest.AddAccount("Test Account 1");
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
}
AddCalendarTest.AddAccount("Test Account 1");
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description"));
}
AddCalendarTest.AddAccount("Test Account 1");
AddCalendarTest.AddAccount("Test Account 2");
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
}
AddCalendarTest.AddAccount("Test Account 1");
AddCalendarTest.AddAccount("Test Account 2");
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
}
AddCalendarTest.AddAccount("Test Account 1");
AddCalendarTest.AddAccount("Test Account 2");
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description"));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description"));
}
AddCalendarTest.AddAccount("Test Account 2");
AddCalendarTest.AddAccount("Test Account 3");
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 1", "calendar1-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
}
AddCalendarTest.AddAccount("Test Account 2");
AddCalendarTest.AddAccount("Test Account 3");
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 2", "calendar2-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
}
AddCalendarTest.AddAccount("Test Account 2");
AddCalendarTest.AddAccount("Test Account 3");
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description"));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description"));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description"));
+ ASSERT_EQ(CDSCALENDAR_OK, AddCalendarTest.AddCalendar(AddCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description"));
}
GetCalendarTest.AddAccount("Test Account 1");
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 2"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 3"));
CDSGetCalendarInfo calendar1Info;
CDSGetCalendarInfo calendar2Info;
ASSERT_EQ("calendar3-test", calendar3Info.calendarTextID);
ASSERT_EQ("Test Account 1", calendar1Info.accountName);
- ASSERT_EQ("Test Account 1", calendar1Info.accountName);
- ASSERT_EQ("Test Account 1", calendar1Info.accountName);
+ ASSERT_EQ("Test Account 1", calendar2Info.accountName);
+ ASSERT_EQ("Test Account 1", calendar3Info.accountName);
+
+ ASSERT_EQ("Calendar Description 1", calendar1Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 2", calendar2Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 3", calendar3Info.calendarDescription);
}
GetCalendarTest.AddAccount("Test Account 1");
GetCalendarTest.AddAccount("Test Account 2");
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 2"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 3"));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 4"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 5"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 6"));
CDSGetCalendarInfo calendar1Info;
CDSGetCalendarInfo calendar2Info;
ASSERT_EQ("Test Account 2", calendar5Info.accountName);
ASSERT_EQ("Test Account 2", calendar6Info.accountName);
+ ASSERT_EQ("Calendar Description 1", calendar1Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 2", calendar2Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 3", calendar3Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 4", calendar4Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 5", calendar5Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 6", calendar6Info.calendarDescription);
+
}
TEST(CalendarDataStorage, Get_Calendar_Information_From_Three_Accounts){
GetCalendarTest.AddAccount("Test Account 2");
GetCalendarTest.AddAccount("Test Account 3");
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 2"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 3"));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 4"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 5"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 6"));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 7"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 8"));
+ ASSERT_EQ(CDSCALENDAR_OK, GetCalendarTest.AddCalendar(GetCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 9"));
CDSGetCalendarInfo calendar1Info;
CDSGetCalendarInfo calendar2Info;
ASSERT_EQ("Test Account 3", calendar8Info.accountName);
ASSERT_EQ("Test Account 3", calendar9Info.accountName);
+ ASSERT_EQ("Calendar Description 1", calendar1Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 2", calendar2Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 3", calendar3Info.calendarDescription);
+
+ ASSERT_EQ("Calendar Description 4", calendar4Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 5", calendar5Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 6", calendar6Info.calendarDescription);
+
+ ASSERT_EQ("Calendar Description 7", calendar7Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 8", calendar8Info.calendarDescription);
+ ASSERT_EQ("Calendar Description 9", calendar9Info.calendarDescription);
+
}
TEST(CalendarDataStorage, Update_One_Calendar_With_One_Account){
UpdateCalendarTest.AddAccount("Test Account 1");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
CDSGetCalendarInfo calendar1Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 1 Updated"));
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarName);
+ ASSERT_EQ("Calendar Description 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarDescription);
}
UpdateCalendarTest.AddAccount("Test Account 1");
UpdateCalendarTest.AddAccount("Test Account 2");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 2"));
CDSGetCalendarInfo calendar1Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test");
CDSGetCalendarInfo calendar2Info = UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 1 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 1 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 2 Updated"));
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarName);
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test").calendarName);
+
+ ASSERT_EQ("Calendar Description 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test").calendarDescription);
}
UpdateCalendarTest.AddAccount("Test Account 2");
UpdateCalendarTest.AddAccount("Test Account 3");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 1", "calendar1-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 2"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 3"));
CDSGetCalendarInfo calendar1Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test");
CDSGetCalendarInfo calendar2Info = UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test");
CDSGetCalendarInfo calendar3Info = UpdateCalendarTest.GetCalendar("Test Account 3", "calendar1-test");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 1 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 1 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 1 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 2 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 3 Updated"));
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarName);
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test").calendarName);
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 3", "calendar1-test").calendarName);
+ ASSERT_EQ("Calendar Description 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 3 Updated", UpdateCalendarTest.GetCalendar("Test Account 3", "calendar1-test").calendarDescription);
+
}
TEST(CalendarDataStorage, Update_Two_Calendars_With_One_Account){
UpdateCalendarTest.AddAccount("Test Account 1");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 2"));
CDSGetCalendarInfo calendar1Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test");
CDSGetCalendarInfo calendar2Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 1 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated", DefaultColour, "Calendar Description 2 Updated"));
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarName);
ASSERT_EQ("Calendar 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarName);
+
+ ASSERT_EQ("Calendar Description 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarDescription);
}
UpdateCalendarTest.AddAccount("Test Account 1");
UpdateCalendarTest.AddAccount("Test Account 2");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 4", "calendar2-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 2"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar1-test", DefaultColour, "Calendar Description 3"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 4", "calendar2-test", DefaultColour, "Calendar Description 4"));
CDSGetCalendarInfo calendar1Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test");
CDSGetCalendarInfo calendar2Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test");
CDSGetCalendarInfo calendar3Info = UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test");
CDSGetCalendarInfo calendar4Info = UpdateCalendarTest.GetCalendar("Test Account 2", "calendar2-test");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 3 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar4Info.calendarID, "Calendar 4 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 1 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated", DefaultColour, "Calendar Description 2 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 3 Updated", DefaultColour, "Calendar Description 3 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar4Info.calendarID, "Calendar 4 Updated", DefaultColour, "Calendar Description 4 Updated"));
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarName);
ASSERT_EQ("Calendar 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarName);
ASSERT_EQ("Calendar 3 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test").calendarName);
ASSERT_EQ("Calendar 4 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar2-test").calendarName);
+ ASSERT_EQ("Calendar Description 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 3 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 4 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar2-test").calendarDescription);
+
}
TEST(CalendarDataStorage, Update_Two_Calendars_With_Three_Accounts){
UpdateCalendarTest.AddAccount("Test Account 2");
UpdateCalendarTest.AddAccount("Test Account 3");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 4", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 5", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 6", "calendar2-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 2"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 3", "calendar1-test", DefaultColour, "Calendar Description 3"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 4", "calendar2-test", DefaultColour, "Calendar Description 4"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 5", "calendar1-test", DefaultColour, "Calendar Description 5"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 6", "calendar2-test", DefaultColour, "Calendar Description 6"));
CDSGetCalendarInfo calendar1Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test");
CDSGetCalendarInfo calendar2Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test");
CDSGetCalendarInfo calendar5Info = UpdateCalendarTest.GetCalendar("Test Account 3", "calendar1-test");
CDSGetCalendarInfo calendar6Info = UpdateCalendarTest.GetCalendar("Test Account 3", "calendar2-test");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 3 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar4Info.calendarID, "Calendar 4 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar5Info.calendarID, "Calendar 5 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar6Info.calendarID, "Calendar 6 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 1 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated", DefaultColour, "Calendar Description 2 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 3 Updated", DefaultColour, "Calendar Description 3 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar4Info.calendarID, "Calendar 4 Updated", DefaultColour, "Calendar Description 4 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar5Info.calendarID, "Calendar 5 Updated", DefaultColour, "Calendar Description 5 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar6Info.calendarID, "Calendar 6 Updated", DefaultColour, "Calendar Description 6 Updated"));
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarName);
ASSERT_EQ("Calendar 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarName);
ASSERT_EQ("Calendar 5 Updated", UpdateCalendarTest.GetCalendar("Test Account 3", "calendar1-test").calendarName);
ASSERT_EQ("Calendar 6 Updated", UpdateCalendarTest.GetCalendar("Test Account 3", "calendar2-test").calendarName);
+ ASSERT_EQ("Calendar Description 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 3 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 4 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar2-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 5 Updated", UpdateCalendarTest.GetCalendar("Test Account 3", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 6 Updated", UpdateCalendarTest.GetCalendar("Test Account 3", "calendar2-test").calendarDescription);
+
}
UpdateCalendarTest.AddAccount("Test Account 1");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 2"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 3"));
CDSGetCalendarInfo calendar1Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test");
CDSGetCalendarInfo calendar2Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test");
CDSGetCalendarInfo calendar3Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar3-test");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 3 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 1 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated", DefaultColour, "Calendar Description 2 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 3 Updated", DefaultColour, "Calendar Description 3 Updated"));
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarName);
ASSERT_EQ("Calendar 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarName);
ASSERT_EQ("Calendar 3 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar3-test").calendarName);
-
+
+ ASSERT_EQ("Calendar Description 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 3 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar3-test").calendarDescription);
+
}
TEST(CalendarDataStorage, Update_Three_Calendars_With_Two_Accounts){
UpdateCalendarTest.AddAccount("Test Account 1");
UpdateCalendarTest.AddAccount("Test Account 2");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 4", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 5", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 6", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 2"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 3"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 4", "calendar1-test", DefaultColour, "Calendar Description 4"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 5", "calendar2-test", DefaultColour, "Calendar Description 5"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 6", "calendar3-test", DefaultColour, "Calendar Description 6"));
CDSGetCalendarInfo calendar1Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test");
CDSGetCalendarInfo calendar2Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test");
CDSGetCalendarInfo calendar5Info = UpdateCalendarTest.GetCalendar("Test Account 2", "calendar2-test");
CDSGetCalendarInfo calendar6Info = UpdateCalendarTest.GetCalendar("Test Account 2", "calendar3-test");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 3 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar4Info.calendarID, "Calendar 4 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar5Info.calendarID, "Calendar 5 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar6Info.calendarID, "Calendar 6 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 1 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated", DefaultColour, "Calendar Description 2 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 3 Updated", DefaultColour, "Calendar Description 3 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar4Info.calendarID, "Calendar 4 Updated", DefaultColour, "Calendar Description 4 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar5Info.calendarID, "Calendar 5 Updated", DefaultColour, "Calendar Description 5 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar6Info.calendarID, "Calendar 6 Updated", DefaultColour, "Calendar Description 6 Updated"));
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarName);
ASSERT_EQ("Calendar 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarName);
ASSERT_EQ("Calendar 5 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar2-test").calendarName);
ASSERT_EQ("Calendar 6 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar3-test").calendarName);
+ ASSERT_EQ("Calendar Description 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 3 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar3-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 4 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 5 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar2-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 6 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar3-test").calendarDescription);
+
}
TEST(CalendarDataStorage, Update_Three_Calendars_With_Three_Accounts){
UpdateCalendarTest.AddAccount("Test Account 2");
UpdateCalendarTest.AddAccount("Test Account 3");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 4", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 5", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 6", "calendar3-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 7", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 8", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 9", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 2"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 3"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 4", "calendar1-test", DefaultColour, "Calendar Description 4"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 5", "calendar2-test", DefaultColour, "Calendar Description 5"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 2").accountID, "Calendar 6", "calendar3-test", DefaultColour, "Calendar Description 6"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 7", "calendar1-test", DefaultColour, "Calendar Description 7"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 8", "calendar2-test", DefaultColour, "Calendar Description 8"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.AddCalendar(UpdateCalendarTest.GetAccount("Test Account 3").accountID, "Calendar 9", "calendar3-test", DefaultColour, "Calendar Description 9"));
CDSGetCalendarInfo calendar1Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test");
CDSGetCalendarInfo calendar2Info = UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test");
CDSGetCalendarInfo calendar8Info = UpdateCalendarTest.GetCalendar("Test Account 3", "calendar2-test");
CDSGetCalendarInfo calendar9Info = UpdateCalendarTest.GetCalendar("Test Account 3", "calendar3-test");
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 3 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar4Info.calendarID, "Calendar 4 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar5Info.calendarID, "Calendar 5 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar6Info.calendarID, "Calendar 6 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar7Info.calendarID, "Calendar 7 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar8Info.calendarID, "Calendar 8 Updated"));
- ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar9Info.calendarID, "Calendar 9 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar1Info.calendarID, "Calendar 1 Updated", DefaultColour, "Calendar Description 1 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar2Info.calendarID, "Calendar 2 Updated", DefaultColour, "Calendar Description 2 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar3Info.calendarID, "Calendar 3 Updated", DefaultColour, "Calendar Description 3 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar4Info.calendarID, "Calendar 4 Updated", DefaultColour, "Calendar Description 4 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar5Info.calendarID, "Calendar 5 Updated", DefaultColour, "Calendar Description 5 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar6Info.calendarID, "Calendar 6 Updated", DefaultColour, "Calendar Description 6 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar7Info.calendarID, "Calendar 7 Updated", DefaultColour, "Calendar Description 7 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar8Info.calendarID, "Calendar 8 Updated", DefaultColour, "Calendar Description 8 Updated"));
+ ASSERT_EQ(CDSCALENDAR_OK, UpdateCalendarTest.UpdateCalendar(calendar9Info.calendarID, "Calendar 9 Updated", DefaultColour, "Calendar Description 9 Updated"));
ASSERT_EQ("Calendar 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarName);
ASSERT_EQ("Calendar 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarName);
ASSERT_EQ("Calendar 8 Updated", UpdateCalendarTest.GetCalendar("Test Account 3", "calendar2-test").calendarName);
ASSERT_EQ("Calendar 9 Updated", UpdateCalendarTest.GetCalendar("Test Account 3", "calendar3-test").calendarName);
+ ASSERT_EQ("Calendar Description 1 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 2 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar2-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 3 Updated", UpdateCalendarTest.GetCalendar("Test Account 1", "calendar3-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 4 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 5 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar2-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 6 Updated", UpdateCalendarTest.GetCalendar("Test Account 2", "calendar3-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 7 Updated", UpdateCalendarTest.GetCalendar("Test Account 3", "calendar1-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 8 Updated", UpdateCalendarTest.GetCalendar("Test Account 3", "calendar2-test").calendarDescription);
+ ASSERT_EQ("Calendar Description 9 Updated", UpdateCalendarTest.GetCalendar("Test Account 3", "calendar3-test").calendarDescription);
+
}
TEST(CalendarDataStorage, Delete_One_Calendar){
DeleteCalendarTest.AddAccount("Test Account 1");
- ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
calendarID = DeleteCalendarTest.GetCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountName, "calendar1-test").calendarID;
DeleteCalendarTest.AddAccount("Test Account 1");
DeleteCalendarTest.AddAccount("Test Account 2");
- ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 1"));
calendarID1 = DeleteCalendarTest.GetCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountName, "calendar1-test").calendarID;
calendarID2 = DeleteCalendarTest.GetCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountName, "calendar2-test").calendarID;
DeleteCalendarTest.AddAccount("Test Account 2");
DeleteCalendarTest.AddAccount("Test Account 3");
- ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour));
- ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour));
+ ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 1"));
+ ASSERT_EQ(CDSCALENDAR_OK, DeleteCalendarTest.AddCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountID, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 1"));
calendarID1 = DeleteCalendarTest.GetCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountName, "calendar1-test").calendarID;
calendarID2 = DeleteCalendarTest.GetCalendar(DeleteCalendarTest.GetAccount("Test Account 1").accountName, "calendar2-test").calendarID;
CalendarDataStorage AddEventTest;
AddEventTest.AddAccount("Test Account 1");
- AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEventResult = AddEventTest.AddEvent(1, "CalendarEvent1.ics");
CalendarDataStorage AddEventTest;
AddEventTest.AddAccount("Test Account 1");
- AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEvent1Result = AddEventTest.AddEvent(1, "CalendarEvent1.ics");
CalendarDataStorage AddEventTest;
AddEventTest.AddAccount("Test Account 1");
- AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEvent1Result = AddEventTest.AddEvent(1, "CalendarEvent1.ics");
CalendarDataStorage AddEventTest;
AddEventTest.AddAccount("Test Account 1");
- AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEventResult = AddEventTest.AddEvent(1, "CalendarEvent1.ics");
// Get the entry information.
CalendarDataStorage AddEventTest;
AddEventTest.AddAccount("Test Account 1");
- AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEventResult = AddEventTest.AddEvent(1, "CalendarEvent2.ics");
EXPECT_EQ(CDSENTRY_OK, addEventResult.addEventResult);
CalendarDataStorage AddEventTest;
AddEventTest.AddAccount("Test Account 1");
- AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEvent1Result = AddEventTest.AddEvent(1, "CalendarEvent1.ics");
CDSAddEntryResult addEvent2Result = AddEventTest.AddEvent(1, "CalendarEvent2.ics");
CalendarDataStorage AddEventTest;
AddEventTest.AddAccount("Test Account 1");
- AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEvent1Result = AddEventTest.AddEvent(1, "CalendarEvent1.ics");
CDSAddEntryResult addEvent2Result = AddEventTest.AddEvent(1, "CalendarEvent1.ics");
CDSAddEntryResult addEvent3Result = AddEventTest.AddEvent(1, "CalendarEvent1.ics");
CalendarDataStorage AddEventTest;
AddEventTest.AddAccount("Test Account 1");
- AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ AddEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEvent1Result = AddEventTest.AddEvent(1, "CalendarEvent1.ics");
CDSAddEntryResult addEvent2Result = AddEventTest.AddEvent(1, "CalendarEvent2.ics");
CDSAddEntryResult addEvent3Result = AddEventTest.AddEvent(1, "CalendarEvent3.ics");
CalendarDataStorage DeleteEventTest;
DeleteEventTest.AddAccount("Test Account 1");
- DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEventResult = DeleteEventTest.AddEvent(1, "CalendarEvent1.ics");
EXPECT_EQ(CDSENTRY_OK, addEventResult.addEventResult);
CalendarDataStorage DeleteEventTest;
DeleteEventTest.AddAccount("Test Account 1");
- DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEvent1Result = DeleteEventTest.AddEvent(1, "CalendarEvent1.ics");
CDSAddEntryResult addEvent2Result = DeleteEventTest.AddEvent(1, "CalendarEvent2.ics");
CalendarDataStorage DeleteEventTest;
DeleteEventTest.AddAccount("Test Account 1");
- DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEvent1Result = DeleteEventTest.AddEvent(1, "CalendarEvent1.ics");
CDSAddEntryResult addEvent2Result = DeleteEventTest.AddEvent(1, "CalendarEvent2.ics");
CDSAddEntryResult addEvent3Result = DeleteEventTest.AddEvent(1, "CalendarEvent3.ics");
CalendarDataStorage DeleteEventTest;
DeleteEventTest.AddAccount("Test Account 1");
- DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEvent1Result = DeleteEventTest.AddEvent(1, "CalendarEvent1.ics");
CDSAddEntryResult addEvent2Result = DeleteEventTest.AddEvent(1, "CalendarEvent2.ics");
CDSAddEntryResult addEvent3Result = DeleteEventTest.AddEvent(1, "CalendarEvent3.ics");
CalendarDataStorage DeleteEventTest;
DeleteEventTest.AddAccount("Test Account 1");
- DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
- DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar2-test", DefaultColour);
+ DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar2-test", DefaultColour, "Calendar Description 1");
// Setup and delete the first calendar.
CalendarDataStorage DeleteEventTest;
DeleteEventTest.AddAccount("Test Account 1");
- DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
- DeleteEventTest.AddCalendar(1, "Calendar 2", "calendar2-test", DefaultColour);
- DeleteEventTest.AddCalendar(1, "Calendar 3", "calendar3-test", DefaultColour);
+ DeleteEventTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteEventTest.AddCalendar(1, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 1");
+ DeleteEventTest.AddCalendar(1, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 1");
// Setup and delete the first calendar.
CalendarDataStorage DeleteAccountTest;
DeleteAccountTest.AddAccount("Test Account 1");
- DeleteAccountTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
+ DeleteAccountTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
// Setup and delete the first account.
// Setup and delete the first account.
- DeleteAccountTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
- DeleteAccountTest.AddCalendar(1, "Calendar 2", "calendar1-test", DefaultColour);
- DeleteAccountTest.AddCalendar(1, "Calendar 3", "calendar1-test", DefaultColour);
+ DeleteAccountTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteAccountTest.AddCalendar(1, "Calendar 2", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteAccountTest.AddCalendar(1, "Calendar 3", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEvent1Result = DeleteAccountTest.AddEvent(1, "CalendarEvent1.ics");
CDSAddEntryResult addEvent2Result = DeleteAccountTest.AddEvent(1, "CalendarEvent2.ics");
// Setup and delete the second account.
- DeleteAccountTest.AddCalendar(2, "Calendar 1", "calendar1-test", DefaultColour);
- DeleteAccountTest.AddCalendar(2, "Calendar 2", "calendar1-test", DefaultColour);
- DeleteAccountTest.AddCalendar(2, "Calendar 3", "calendar1-test", DefaultColour);
+ DeleteAccountTest.AddCalendar(2, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteAccountTest.AddCalendar(2, "Calendar 2", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteAccountTest.AddCalendar(2, "Calendar 3", "calendar1-test", DefaultColour, "Calendar Description 1");
addEvent1Result = DeleteAccountTest.AddEvent(4, "CalendarEvent1.ics");
addEvent2Result = DeleteAccountTest.AddEvent(4, "CalendarEvent2.ics");
// Setup and delete the first account.
- DeleteAccountTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
- DeleteAccountTest.AddCalendar(1, "Calendar 2", "calendar1-test", DefaultColour);
- DeleteAccountTest.AddCalendar(1, "Calendar 3", "calendar1-test", DefaultColour);
+ DeleteAccountTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteAccountTest.AddCalendar(1, "Calendar 2", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteAccountTest.AddCalendar(1, "Calendar 3", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEvent1Result = DeleteAccountTest.AddEvent(1, "CalendarEvent1.ics");
CDSAddEntryResult addEvent2Result = DeleteAccountTest.AddEvent(1, "CalendarEvent2.ics");
// Setup and delete the second account.
- DeleteAccountTest.AddCalendar(2, "Calendar 1", "calendar1-test", DefaultColour);
- DeleteAccountTest.AddCalendar(2, "Calendar 2", "calendar1-test", DefaultColour);
- DeleteAccountTest.AddCalendar(2, "Calendar 3", "calendar1-test", DefaultColour);
+ DeleteAccountTest.AddCalendar(2, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteAccountTest.AddCalendar(2, "Calendar 2", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteAccountTest.AddCalendar(2, "Calendar 3", "calendar1-test", DefaultColour, "Calendar Description 1");
addEvent1Result = DeleteAccountTest.AddEvent(4, "CalendarEvent1.ics");
addEvent2Result = DeleteAccountTest.AddEvent(4, "CalendarEvent2.ics");
// Setup and delete the third account.
- DeleteAccountTest.AddCalendar(3, "Calendar 1", "calendar1-test", DefaultColour);
- DeleteAccountTest.AddCalendar(3, "Calendar 2", "calendar1-test", DefaultColour);
- DeleteAccountTest.AddCalendar(3, "Calendar 3", "calendar1-test", DefaultColour);
+ DeleteAccountTest.AddCalendar(3, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteAccountTest.AddCalendar(3, "Calendar 2", "calendar1-test", DefaultColour, "Calendar Description 1");
+ DeleteAccountTest.AddCalendar(3, "Calendar 3", "calendar1-test", DefaultColour, "Calendar Description 1");
addEvent1Result = DeleteAccountTest.AddEvent(7, "CalendarEvent1.ics");
addEvent2Result = DeleteAccountTest.AddEvent(7, "CalendarEvent2.ics");
// Setup and delete the first account.
- GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar1-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar1-test", DefaultColour);
+ GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar1-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar1-test", DefaultColour, "Calendar Description 1");
CDSAddEntryResult addEvent1Result = GetEventsListTest.AddEvent(1, "CalendarEvent1.ics");
CDSAddEntryResult addEvent2Result = GetEventsListTest.AddEvent(1, "CalendarEvent2.ics");
// Setup and delete the first account.
- GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar1-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar1-test", DefaultColour);
+ GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar1-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar1-test", DefaultColour, "Calendar Description 1");
// Setup the first account.
// Setup and delete the first account.
- GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar1-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar1-test", DefaultColour);
+ GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar1-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar1-test", DefaultColour, "Calendar Description 1");
// Setup the first account.
// Setup the first account.
- GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar2-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar3-test", DefaultColour);
+ GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 1");
// Get the list of calendar IDs.
// Setup the first account.
- GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar2-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar3-test", DefaultColour);
+ GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 1");
// Get the list of calendar IDs.
// Setup the second account.
- GetEventsListTest.AddCalendar(2, "Calendar 4", "calendar4-test", DefaultColour);
- GetEventsListTest.AddCalendar(2, "Calendar 5", "calendar5-test", DefaultColour);
- GetEventsListTest.AddCalendar(2, "Calendar 6", "calendar6-test", DefaultColour);
+ GetEventsListTest.AddCalendar(2, "Calendar 4", "calendar4-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(2, "Calendar 5", "calendar5-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(2, "Calendar 6", "calendar6-test", DefaultColour, "Calendar Description 1");
calendarList = GetEventsListTest.GetCalendarList(2);
// Setup the first account.
- GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar2-test", DefaultColour);
- GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar3-test", DefaultColour);
+ GetEventsListTest.AddCalendar(1, "Calendar 1", "calendar1-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 2", "calendar2-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(1, "Calendar 3", "calendar3-test", DefaultColour, "Calendar Description 1");
// Get the list of calendar IDs.
// Setup the second account.
- GetEventsListTest.AddCalendar(2, "Calendar 4", "calendar4-test", DefaultColour);
- GetEventsListTest.AddCalendar(2, "Calendar 5", "calendar5-test", DefaultColour);
- GetEventsListTest.AddCalendar(2, "Calendar 6", "calendar6-test", DefaultColour);
+ GetEventsListTest.AddCalendar(2, "Calendar 4", "calendar4-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(2, "Calendar 5", "calendar5-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(2, "Calendar 6", "calendar6-test", DefaultColour, "Calendar Description 1");
calendarList = GetEventsListTest.GetCalendarList(2);
// Setup the third account.
- GetEventsListTest.AddCalendar(3, "Calendar 7", "calendar7-test", DefaultColour);
- GetEventsListTest.AddCalendar(3, "Calendar 8", "calendar8-test", DefaultColour);
- GetEventsListTest.AddCalendar(3, "Calendar 9", "calendar9-test", DefaultColour);
+ GetEventsListTest.AddCalendar(3, "Calendar 7", "calendar7-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(3, "Calendar 8", "calendar8-test", DefaultColour, "Calendar Description 1");
+ GetEventsListTest.AddCalendar(3, "Calendar 9", "calendar9-test", DefaultColour, "Calendar Description 1");
calendarList = GetEventsListTest.GetCalendarList(3);
EXPECT_EQ("calendar8-test", calendarList.calendarListTextID.at(1));
EXPECT_EQ("calendar9-test", calendarList.calendarListTextID.at(2));
+}
+
+TEST(CalendarDataStorage, Add_One_Checksum){
+
+ CalendarDataStorage ChecksumTest;
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("firstChecksum", "checksumYay"));
+
+ // Get the checksum.
+
+ //EXPECT_EQ("checksumYay", ChecksumTest.GetChecksum("firstChecksum"));
+
+}
+
+TEST(CalendarDataStorage, Add_Two_Checksus){
+
+ CalendarDataStorage ChecksumTest;
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("firstChecksum", "checksumYay"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("secondChecksum", "checksumTwo"));
+
+}
+
+TEST(CalendarDataStorage, Add_Three_Checksus){
+
+ CalendarDataStorage ChecksumTest;
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("firstChecksum", "checksumYay"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("secondChecksum", "checksumTwo"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("thirdChecksum", "checksumThree"));
+
+}
+
+TEST(CalendarDataStorage, Add_One_Checksum_And_Get_One_Checksum){
+
+ CalendarDataStorage ChecksumTest;
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("firstChecksum", "checksumYay"));
+
+ // Get the checksum.
+
+ CDSGetChecksumResult getChecksumResult = ChecksumTest.GetChecksum("firstChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumYay", getChecksumResult.checksumValue);
+
+}
+
+TEST(CalendarDataStorage, Add_Two_Checksums_And_Get_Two_Checksums){
+
+ CalendarDataStorage ChecksumTest;
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("firstChecksum", "checksumYay"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("secondChecksum", "checksumTwo"));
+
+ // Get the checksums.
+
+ CDSGetChecksumResult getChecksumResult = ChecksumTest.GetChecksum("firstChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumYay", getChecksumResult.checksumValue);
+
+ getChecksumResult = ChecksumTest.GetChecksum("secondChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumTwo", getChecksumResult.checksumValue);
+
+}
+
+TEST(CalendarDataStorage, Add_Three_Checksums_And_Get_Three_Checksums){
+
+ CalendarDataStorage ChecksumTest;
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("firstChecksum", "checksumYay"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("secondChecksum", "checksumTwo"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("thirdChecksum", "checksumThree"));
+
+ // Get the checksums.
+
+ CDSGetChecksumResult getChecksumResult = ChecksumTest.GetChecksum("firstChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumYay", getChecksumResult.checksumValue);
+
+ getChecksumResult = ChecksumTest.GetChecksum("secondChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumTwo", getChecksumResult.checksumValue);
+
+ getChecksumResult = ChecksumTest.GetChecksum("thirdChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumThree", getChecksumResult.checksumValue);
+
+}
+
+TEST(CalendarDataStorage, Add_One_Checksum_Update_One_Checksum_And_Get_One_Checksum){
+
+ CalendarDataStorage ChecksumTest;
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("firstChecksum", "checksumYay"));
+
+ // Get the checksum.
+
+ CDSGetChecksumResult getChecksumResult = ChecksumTest.GetChecksum("firstChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumYay", getChecksumResult.checksumValue);
+
+ // Update the checksum.
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.UpdateChecksum("firstChecksum", "updatedChecksum1"));
+
+ // Get the checksum again.
+
+ getChecksumResult = ChecksumTest.GetChecksum("firstChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("updatedChecksum1", getChecksumResult.checksumValue);
+
+}
+
+TEST(CalendarDataStorage, Add_Two_Checksums_Update_Two_Checksums_And_Get_Two_Checksums){
+
+ CalendarDataStorage ChecksumTest;
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("firstChecksum", "checksumYay"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("secondChecksum", "checksumTwo"));
+
+ // Get the checksum.
+
+ CDSGetChecksumResult getChecksumResult = ChecksumTest.GetChecksum("firstChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumYay", getChecksumResult.checksumValue);
+
+ getChecksumResult = ChecksumTest.GetChecksum("secondChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumTwo", getChecksumResult.checksumValue);
+
+ // Update the checksum.
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.UpdateChecksum("firstChecksum", "updatedChecksum1"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.UpdateChecksum("secondChecksum", "updatedChecksum2"));
+
+ // Get the checksum again.
+
+ getChecksumResult = ChecksumTest.GetChecksum("firstChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("updatedChecksum1", getChecksumResult.checksumValue);
+
+ getChecksumResult = ChecksumTest.GetChecksum("secondChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("updatedChecksum2", getChecksumResult.checksumValue);
+
+}
+
+TEST(CalendarDataStorage, Add_Three_Checksums_Update_Three_Checksums_And_Get_Three_Checksums){
+
+ CalendarDataStorage ChecksumTest;
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("firstChecksum", "checksumYay"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("secondChecksum", "checksumTwo"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.AddChecksum("thirdChecksum", "checksumThree"));
+
+ // Get the checksum.
+
+ CDSGetChecksumResult getChecksumResult = ChecksumTest.GetChecksum("firstChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumYay", getChecksumResult.checksumValue);
+
+ getChecksumResult = ChecksumTest.GetChecksum("secondChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumTwo", getChecksumResult.checksumValue);
+
+ getChecksumResult = ChecksumTest.GetChecksum("thirdChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("checksumThree", getChecksumResult.checksumValue);
+
+ // Update the checksum.
+
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.UpdateChecksum("firstChecksum", "updatedChecksum1"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.UpdateChecksum("secondChecksum", "updatedChecksum2"));
+ EXPECT_EQ(CDSCHECKSUM_OK, ChecksumTest.UpdateChecksum("thirdChecksum", "updatedChecksum3"));
+
+ // Get the checksum again.
+
+ getChecksumResult = ChecksumTest.GetChecksum("firstChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("updatedChecksum1", getChecksumResult.checksumValue);
+
+ getChecksumResult = ChecksumTest.GetChecksum("secondChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("updatedChecksum2", getChecksumResult.checksumValue);
+
+ getChecksumResult = ChecksumTest.GetChecksum("thirdChecksum");
+
+ EXPECT_EQ(CDSCHECKSUM_OK, getChecksumResult.getChecksumResult);
+ EXPECT_EQ("updatedChecksum3", getChecksumResult.checksumValue);
+
}
\ No newline at end of file