Beispiel #1
0
 public void When_Given_Time_Keeps_Time()
 {
     var Expected = new TimeSpan(1, 2, 3);
     var clock = new FancyClock(mockFancyClockFormatter.Object);
     clock.Time = Expected;
     var Actual = clock.Time;
     Assert.AreEqual(Expected, Actual);
 }
Beispiel #2
0
 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);
 }
Beispiel #3
0
 public void Can_Create_FancyClock()
 {
     var clock = new FancyClock(mockFancyClockFormatter.Object);
     Assert.IsNotNull(clock);
 }