private void AssertXmlContentParserExceptionIsThrown(string messageContent) { XmlContentParserException exception = Assert.Throws <XmlContentParserException>(() => { NoMissingXmlElementsValidator.Validate(messageContent); }); exception.Message.Should() .Be("The specified message content contains XML elements without it's corresponding pair."); }
public void MessageContentWithMatchingXmlElementDoesNotThrowException(string messageContent) { Assert.DoesNotThrow(() => NoMissingXmlElementsValidator.Validate(messageContent)); }