Esempio n. 1
0
        /// <summary>
        /// Tests all Reminder fields match the expected values.
        /// </summary>
        internal static void AssertAreEqual(ReminderBuilder expected, Reminder actual, string message)
        {
            var messagePrefix = String.Format("{0} Label:<{1}>.", message, expected.GetLabel());

            Assert.AreEqual(expected.GetDetails(), actual.GetDetails(), String.Concat(messagePrefix, " details"));
            Assert.AreEqual(false, actual.IsRepeating(), String.Concat(messagePrefix, " IsRepeating"));
            Assert.AreEqual(expected.GetLabel(), actual.GetLabel(), String.Concat(messagePrefix, " label"));

            var expectedClassId = new ClassId("Reminder");

            Assert.AreEqual(0, actual.GetClassId().CompareTo(expectedClassId), String.Concat(messagePrefix, " classId"));

            // Test the Reminder.Date; which is exposed through the IsOccuringOn method.
            CalendarEventTest.IsOccuringOnTest(actual, expected.GetDate(), expected.GetDate());
        }