public void GetDateTimeTest_ReturnSetDateTime() { DateTime now = DateTime.Now; ClockSimulator clockSim = new ClockSimulator(1, 60, now); Assert.Equal(now, clockSim.GetDateTime()); }
public void GetDateTimeTest_ShouldReturnSetDateTime() { //Arrange DateTime now = DateTime.Now; ClockSimulator clockSim = new ClockSimulator(1, 60, now); //Act //Assert Assert.AreEqual(now, clockSim.GetDateTime()); }
public void StartClockTest_RunningClockShouldResultInADifferentTimeFromNow() { //Arrange DateTime now = DateTime.Now; ClockSimulator clockSim = new ClockSimulator(1, 60, now); //Act clockSim.StartClock(); Thread.Sleep(5); clockSim.StopClock(); //Assert Assert.AreNotEqual(now, clockSim.GetDateTime()); }