Skip to content

Conversation

@kimsey0
Copy link
Contributor

@kimsey0 kimsey0 commented Nov 7, 2019

IMPORTANT

  • The code complies with the Coding Guidelines for C#.
  • The changes are covered by a new or existing set of unit tests which follow the Arrange-Act-Assert syntax such as is used in this example.
  • If the contribution affects the documentation, please include your changes to documentation.md in this pull request so the documentation will appear on the website.

Fixes #1175

@kimsey0
Copy link
Contributor Author

kimsey0 commented Nov 7, 2019

@jnyrup, @dennisdoomen: Does this follow the right pattern? Then I'll add the rest of the methods.

@jnyrup
Copy link
Member

jnyrup commented Nov 7, 2019

Looks good to me 👍

@kimsey0
Copy link
Contributor Author

kimsey0 commented Nov 8, 2019

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}," +
Copy link
Member

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

Copy link
Contributor Author

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" +

@jnyrup
Copy link
Member

jnyrup commented Dec 7, 2019

@dennisdoomen I don't think it's ready for review yet?

@kimsey0 kimsey0 marked this pull request as ready for review December 8, 2019 23:36
@kimsey0
Copy link
Contributor Author

kimsey0 commented Dec 8, 2019

@jnyrup, @dennisdoomen: I've adjusted this for the null and prefix namespace handling changes. How does it look?

@kimsey0
Copy link
Contributor Author

kimsey0 commented Dec 8, 2019

(Documentation is still missing. I'll get to that.)

@kimsey0
Copy link
Contributor Author

kimsey0 commented Dec 9, 2019

The Type, Method, and Property assertions documentation section doesn't document all type assertions, but I've added a call to BeInNamespace, just to make readers aware of the namespace assertions.


// Act
Action act = () =>
types.Should().BeInNamespace(nameof(DummyNamespace),
Copy link
Member

Choose a reason for hiding this comment

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

BeInNamespace -> NotBeInNamespace?

Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

@dennisdoomen dennisdoomen added this to the 6.0 milestone Jan 4, 2020
@dennisdoomen
Copy link
Member

@jnyrup What should we do with this PR? Finish it ourselves? Looks like @kimsey0 has abandoned it.

@jnyrup
Copy link
Member

jnyrup commented May 17, 2020

@dennisdoomen I'll wrap it up.

@jnyrup jnyrup closed this in #1329 May 18, 2020
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.

3 participants