コード例 #1
0
        public void CanIdentifyXmlClosingElementsFromMessageContent(string messageContent)
        {
            IEnumerable <string> xmlElements = IdentifyXmlElementsService.IdentifyXmlElements(messageContent, RegularExpressions.XmlCloseElementRegex).ToList();

            xmlElements.Should().Contain("</test1>");
            xmlElements.Should().Contain("</test2>");
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        public void MessageContentWithSelfClosingXmlElementReturnsEmptyList(string messageContent)
        {
            IEnumerable <string> xmlElements = IdentifyXmlElementsService.IdentifyXmlElements(messageContent, RegularExpressions.XmlOpenElementRegex).ToList();

            xmlElements.Should().BeEmpty();
        }