public void ShouldBeNowOfFirstAccess() { NowAtFirstAccess subject = new NowAtFirstAccess(); DateTime now = DateTime.Now; //Act DateTime actual = subject; //Assert actual.Should().BeAfter(now); }
public void ShouldCalculateDifference() { //Arrange NowAtFirstAccess later = new NowAtFirstAccess(); Now now = new Now(); DifferenceOfTimeInstant subject = new DifferenceOfTimeInstant(now, later); //Act TimeSpan actual = subject; //Assert actual.Should().BeNegative(); actual.Should().BeCloseTo(new TimeSpan()); actual.Should().NotBe(new TimeSpan()); }