public void CanIdentifyXmlClosingElementsFromMessageContent(string messageContent) { IEnumerable <string> xmlElements = IdentifyXmlElementsService.IdentifyXmlElements(messageContent, RegularExpressions.XmlCloseElementRegex).ToList(); xmlElements.Should().Contain("</test1>"); xmlElements.Should().Contain("</test2>"); }
public void MessageContentWithSymbolsReturnsEmptyList() { const string messageContent = "<*****@*****.**>"; IEnumerable <string> xmlOpeningElements = IdentifyXmlElementsService.IdentifyXmlElements(messageContent, RegularExpressions.XmlOpenElementRegex).ToList(); IEnumerable <string> xmlClosingElements = IdentifyXmlElementsService.IdentifyXmlElements(messageContent, RegularExpressions.XmlCloseElementRegex).ToList(); xmlOpeningElements.Should().BeEmpty(); xmlClosingElements.Should().BeEmpty(); }
public void MessageContentWithSelfClosingXmlElementReturnsEmptyList(string messageContent) { IEnumerable <string> xmlElements = IdentifyXmlElementsService.IdentifyXmlElements(messageContent, RegularExpressions.XmlOpenElementRegex).ToList(); xmlElements.Should().BeEmpty(); }