public void GetAllEntriesCountTest() { EntryList target = new EntryList(); target.LoadEntries(null, "EntrySet01"); int expected = 9; int actual = target.GetAllEntriesCount(); Assert.AreEqual(expected, actual); }
public void GetDaysCountTest() { // Ignore this test on other timezones. // TODO Make this test meaningful in other timezones. if (TimeZone.CurrentTimeZone.StandardName != "Eastern Standard Time") { return; } EntryList target = new EntryList(); target.LoadEntries(null, "EntrySet01"); int expected = 6; int actual = target.GetDaysCount(); Assert.AreEqual(expected, actual); }
public void GetTodayCountTest() { // Ignore this test on other timezones. // TODO Make this test meaningful in other timezones. if (TimeZone.CurrentTimeZone.StandardName != "Eastern Standard Time") { return; } EntryList target = new EntryList(); target.LoadEntries(null, "EntrySet01"); DateTime now = new DateTime(2012, 1, 25, 0, 0, 0, 0, DateTimeKind.Local); int expected = 2; int actual = target.GetTodayCount(now); Assert.AreEqual(expected, actual); }