You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be helpful to get a compile error if a particular property is not accessed in an assert section of a unit test. This helps keep tests up to date when new properties are added.
Syntax proposal
Use // AccessAll {identifier list} to list all variables that should have their properties read or written.
Use :read or :write to specify type of access. Defaults to any of them.
// AccessAll slot:read// The above comment will enable analyzer for the 'slot' variable and its properties.// If any of its properties are not read, a compile error is generated.
slot.Price.Should().NotBeNull();
slot.Duration.Should().Be(TimeSpan.FromHours(2));
slot.Price.Currency.Should().Be("NOK");
slot.Price.AppliedDiscounts.Should().BeEmpty();
The text was updated successfully, but these errors were encountered:
Relates to #2 .
It would be helpful to get a compile error if a particular property is not accessed in an assert section of a unit test. This helps keep tests up to date when new properties are added.
Syntax proposal
Use
// AccessAll {identifier list}
to list all variables that should have their properties read or written.Use
:read
or:write
to specify type of access. Defaults to any of them.The text was updated successfully, but these errors were encountered: