Skip to content

feat: support .net 6 DateOnly TimeOnly structs#84

Open
pdevito3 wants to merge 1 commit intonickdodd79:masterfrom
pdevito3:feature/dateonly-timeonly-support
Open

feat: support .net 6 DateOnly TimeOnly structs#84
pdevito3 wants to merge 1 commit intonickdodd79:masterfrom
pdevito3:feature/dateonly-timeonly-support

Conversation

@pdevito3
Copy link

@pdevito3 pdevito3 commented Apr 30, 2022

fixes #76

tried to follow your pattern throughout and included a test for the new type. I did have to do some minor update fluent assertion updates as well.

let me know if you have any questions or concerns!

entity2.Name.Should().Be(entity1.Name);
entity2.DeprecationDate.Should().BeCloseTo(entity1.DeprecationDate, 500);
entity2.Name.Should().Be(entity1.Name);
entity2.DeprecationDate.Should().BeCloseTo(entity1.DeprecationDate, TimeSpan.FromMilliseconds(500));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new fluent assertion syntax

options => options
.Using<string>(context => context.Subject.Should().NotBeNull())
.When(info => info.SelectedMemberPath == "Status")
.When(info => info.Path.Contains("Status"))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

new fluent assertion syntax


<ItemGroup>
<PackageReference Include="FluentAssertions" Version="5.10.3" />
<PackageReference Include="FluentAssertions" Version="6.6.0" />
Copy link
Author

@pdevito3 pdevito3 Apr 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needed to update FA to accommodate the dateonly timeonly handling

@304NotModified
Copy link

this looks like a great feature! polite bump @nickdodd79

@pdevito3
Copy link
Author

I don't think he's maintaining the lib anymore. I made a fork that can handle this if you want to use it.

https://www.nuget.org/packages/AutoBogusLifesupport

https://github.com/pdevito3/AutoBogus

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

Successfully merging this pull request may close these issues.

Generating a class with a .NET 6 DateOnly property fails

2 participants