Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Message for DateTimeOffset comparison not displaying milliseconds #877

Open
Hazzamanic opened this issue Feb 3, 2023 · 1 comment
Open

Comments

@Hazzamanic
Copy link

Shouldly correctly compares the millisecond portion of DateTimeOffset, but does not display it in the message.

[Fact]
public void Test()
{
    var dateTimeOffset1 = new DateTimeOffset(new DateTime(2023, 12, 01, 01, 01, 01, 123));
    var dateTimeOffset2 = new DateTimeOffset(new DateTime(2023, 12, 01, 01, 01, 01));

    dateTimeOffset1.ShouldBe(dateTimeOffset2);
}

image

For comparison, here is the fluent assertions output:
image

@pwhe23
Copy link

pwhe23 commented Aug 23, 2023

+1 I just had this same problem and it really threw me for a bit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants