-
Notifications
You must be signed in to change notification settings - Fork 731
Closed
Labels
Description
Background and motivation
follow up on #2422
The DateTime tips are not complete and cover just a few cases
we should add the following as well:
// Positive:
// New:
actual.Should().HaveYear(expected.Year);
actual.Should().HaveMonth(expected.Month);
actual.Should().HaveDay(expected.Day);
actual.Should().HaveHour(expected.Hour);
actual.Should().HaveMinute(expected.Minute);
actual.Should().HaveSecond(expected.Second);
actual.Should().BeIn(DateTimeKind.Utc);
// Old:
actual.Year.Should().Be(expected.Year);
actual.Month.Should().Be(expected.Month);
actual.Day.Should().Be(expected.Day);
actual.Hour.Should().Be(expected.Hour);
actual.Minute.Should().Be(expected.Minute);
actual.Second.Should().Be(expected.Second);
actual.Kind.Should().Be(DateTimeKind.Utc);
// Negative
// New
actual.Should().NotHaveYear(expected.Year);
actual.Should().NotHaveMonth(expected.Month);
actual.Should().NotHaveDay(expected.Day);
actual.Should().NotHaveHour(expected.Hour);
actual.Should().NotHaveMinute(expected.Minute);
actual.Should().NotHaveSecond(expected.Second);
// Old
actual.Year.Should().NotBe(expected.Year);
actual.Month.Should().NotBe(expected.Month);
actual.Day.Should().NotBe(expected.Day);
actual.Hour.Should().NotBe(expected.Hour);
actual.Minute.Should().NotBe(expected.Minute);
actual.Second.Should().NotBe(expected.Second);Are you willing help with a pull-request?
Yes, please assign this issue to me.
