public void Today_ReturnsToday() { // Arrange StandardDateTimeProvider dateTimeProvider = new StandardDateTimeProvider(); DateTime controlTime = DateTime.Today; // Act var result = dateTimeProvider.Today; // Assert result.Should().Be(controlTime); result.Kind.Should().Be(DateTimeKind.Local); }
public void CurrentUtcDateTime_ReturnsCurrentUtcDateTime() { // Arrange StandardDateTimeProvider dateTimeProvider = new StandardDateTimeProvider(); DateTime controlTime = DateTime.UtcNow; // Act var result = dateTimeProvider.CurrentUtcDateTime; // Assert result.Should().BeCloseTo(controlTime, 100); result.Kind.Should().Be(DateTimeKind.Utc); }