public void GetMinute_Returns_Null_For_High_Numbers() { TimeWords expected = new TimeWords(); var actual = RunGetMinuteTest(new TimeSpan(1, 59, 3)); Assert.AreEqual(expected, actual); }
public void GetHour_Returns_Five() { TimeWords expected = new TimeWords(); expected.Five = true; var actual = RunGetHourTest(new TimeSpan(5, 2, 3)); Assert.AreEqual(expected, actual); }
public void GetMinute_Returns_Five_To_On_Fifty_Five() { TimeWords expected = new TimeWords(); expected.FiveMinute = true; expected.To = true; var actual = RunGetMinuteTest(new TimeSpan(1, 55, 3)); Assert.AreEqual(expected, actual); }
public void GetMinute_Returns_Five_Past() { TimeWords expected = new TimeWords(); expected.FiveMinute = true; expected.Past = true; var actual = RunGetMinuteTest(new TimeSpan(1, 4, 3)); Assert.AreEqual(expected, actual); }
public void GetHour_Does_Not_Return_Twelve_at_One() { TimeWords expected = new TimeWords(); expected.Twelve = true; var actual = RunGetHourTest(new TimeSpan(1, 2, 3)); Assert.AreNotEqual(expected, actual); }
public void GetHour_Returns_Twelve_at_Midnight() { TimeWords expected = new TimeWords(); expected.Twelve = true; var actual = RunGetHourTest(new TimeSpan(0, 2, 3)); Assert.AreEqual(expected, actual); }
public void GetHour_Returns_Eleven_At_Twenty_Three() { TimeWords expected = new TimeWords(); expected.Eleven = true; var actual = RunGetHourTest(new TimeSpan(23, 2, 3)); Assert.AreEqual(expected, actual); }
public void GetTime_Returns_Five_Past_Two_On_Two_Five() { FancyClockFormatter target = new FancyClockFormatter(); TimeSpan Time = new TimeSpan(2, 5, 3); TimeWords expected = new TimeWords(); expected.Two = true; expected.FiveMinute = true; expected.Past = true; var actual = target.GetTime(Time); Assert.AreEqual(expected, actual); }
public void GetTime_Returns_Five_To_One_On_Twelve_Fifty_Five() { FancyClockFormatter target = new FancyClockFormatter(); TimeSpan Time = new TimeSpan(12, 55, 3); TimeWords expected = new TimeWords(); expected.One = true; expected.FiveMinute = true; expected.To = true; var actual = target.GetTime(Time); Assert.AreEqual(expected, actual); }
public void Calls_GetHour_To_Round_Minute() { var Time = new TimeSpan(1, 35, 0);//01:35:00 var words = new TimeWords(); words.One = true; words.Half = true; words.Past = true; mockFancyClockFormatter.Setup(x => x.GetMinute(Time)).Returns(words); var Expected = words; var clock = new FancyClock(mockFancyClockFormatter.Object); clock.Time = Time; var Actual = clock.Minute; Assert.AreEqual(Expected, Actual); }
public void op_Decrement_Reduces_Hour() { TimeWords c1 = new TimeWords(); TimeWords expected = new TimeWords(); c1.Eight = true; c1.FiveMinute = true; c1.To = true; expected.Seven = true; expected.FiveMinute = true; expected.To = true; TimeWords actual; actual = --(c1); Assert.AreEqual(expected, actual); }
public void op_AdditionTest() { TimeWords c1 = new TimeWords(); TimeWords c2 = new TimeWords(); TimeWords expected = new TimeWords(); c1.Eight = true; c2.FiveMinute = true; c2.To = true; expected.Eight = true; expected.FiveMinute = true; expected.To = true; TimeWords actual; actual = (c1 + c2); Assert.AreEqual(expected, actual); }
public void op_Decrement_Reduces_Hour_From_One_To_Twelve() { TimeWords c1 = new TimeWords(); TimeWords expected = new TimeWords(); c1.One = true; c1.FiveMinute = true; c1.To = true; expected.Twelve = true; expected.FiveMinute = true; expected.To = true; TimeWords actual; actual = --(c1); Assert.AreEqual(expected, actual); }