XElementAssertions.HaveElement() throws a funny error message (because we [...] message) although I didn't specify a reason.
CodeSnippet:
xml.Element("Root")
.Should().HaveElement("Children");
I get the following error message:
Expected XML element <Root /> to have child element <Children>
because we want to test the failure message,
but no such child element was found.
CodeSnippet:
xml.Element("Root")
.Should().HaveElement("Children");
I get the following error message:
Expected XML element <Root /> to have child element <Children>
because we want to test the failure message,
but no such child element was found.