-
Notifications
You must be signed in to change notification settings - Fork 731
Add new namespace assertions to TypeSelectorAssertions #1180
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
Conversation
|
@jnyrup, @dennisdoomen: Does this follow the right pattern? Then I'll add the rest of the methods. |
|
Looks good to me 👍 |
…_is_in_another_namespace_it_fails test
…tions to TypeSelectorAssertions
|
I have added the rest of the assertions together with tests for the oddities discussed in #1175. I'm still missing some documentation. |
| Execute.Assertion | ||
| .ForCondition(!typesInNamespace.Any()) | ||
| .BecauseOf(because, becauseArgs) | ||
| .FailWith("Expected all types to not be in namespace {0}{reason}," + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Expected none of the types to be in namespace
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One could consider changing the wording in TypeAssertionSpecs as well, for example at
| .WithMessage("Expected all types to not be decorated*DummyClassAttribute" + |
|
@dennisdoomen I don't think it's ready for review yet? |
…espace extension method
|
@jnyrup, @dennisdoomen: I've adjusted this for the null and prefix namespace handling changes. How does it look? |
|
(Documentation is still missing. I'll get to that.) |
…documentation section
|
The Type, Method, and Property assertions documentation section doesn't document all type assertions, but I've added a call to |
|
|
||
| // Act | ||
| Action act = () => | ||
| types.Should().BeInNamespace(nameof(DummyNamespace), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BeInNamespace -> NotBeInNamespace?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kimsey0 would be nice to wrap this up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kimsey0 ?
|
@dennisdoomen I'll wrap it up. |
IMPORTANT
Fixes #1175