public void SplittingEmptyXPathsStringReturnsEmptyList()
        {
            string xpathsStrings = "";

            IList <string> xpaths = EntLibLoggingProxyTraceListener.SplitXPathQueriesString(xpathsStrings);

            Assert.AreEqual(0, xpaths.Count);
        }
        public void SplittingEscapedSemicolonReturnsSingleElementList()
        {
            string xpathsStrings = @"single\;path";

            IList <string> xpaths = EntLibLoggingProxyTraceListener.SplitXPathQueriesString(xpathsStrings);

            Assert.AreEqual(1, xpaths.Count);
            Assert.AreEqual("single;path", xpaths[0]);
        }
        public void SplittingSinglePathXPathsStringReturnsSingleElementList()
        {
            string xpathsStrings = "single path";

            IList <string> xpaths = EntLibLoggingProxyTraceListener.SplitXPathQueriesString(xpathsStrings);

            Assert.AreEqual(1, xpaths.Count);
            Assert.AreEqual("single path", xpaths[0]);
        }
        public void SplittingWithSingleSemicolonReturnsTwoElementsList()
        {
            string xpathsStrings = @"multiple;paths";

            IList <string> xpaths = EntLibLoggingProxyTraceListener.SplitXPathQueriesString(xpathsStrings);

            Assert.AreEqual(2, xpaths.Count);
            Assert.AreEqual("multiple", xpaths[0]);
            Assert.AreEqual("paths", xpaths[1]);
        }
        public void SplittingMixedEscapedAndNonEscapedSemicolonsIsOk()
        {
            string xpathsStrings = @"thr\;ee;\;multiple;paths\;;";

            IList <string> xpaths = EntLibLoggingProxyTraceListener.SplitXPathQueriesString(xpathsStrings);

            Assert.AreEqual(3, xpaths.Count);
            Assert.AreEqual("thr;ee", xpaths[0]);
            Assert.AreEqual(";multiple", xpaths[1]);
            Assert.AreEqual("paths;", xpaths[2]);
        }
        public void SplittingWithTrailingSemiColonIsOk()
        {
            string xpathsStrings = @"three;multiple;paths;";

            IList <string> xpaths = EntLibLoggingProxyTraceListener.SplitXPathQueriesString(xpathsStrings);

            Assert.AreEqual(3, xpaths.Count);
            Assert.AreEqual("three", xpaths[0]);
            Assert.AreEqual("multiple", xpaths[1]);
            Assert.AreEqual("paths", xpaths[2]);
        }