コード例 #1
0
        public void CanParseSingleQuotedListWithCommaSeparator()
        {
            string line = "'batman', 'bruce wayne', 'gambit'";
            IDictionary <string, string> items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }
コード例 #2
0
        public void CanParseQuotedListNewLine()
        {
            string line = "'batman', 'bruce wayne', 'gambit'\r\n";
            IDictionary <string, string> items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }
コード例 #3
0
        public void CanParseDoubleQuotedListWithCommaSeparatorWithInnerComma()
        {
            string line = "\"batman\", \"bruce, wayne\", \"gambit\"";
            IDictionary <string, string> items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce, wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }
コード例 #4
0
        public void CanParseSingleQuotedListWithCommaSeparatorWithInnerComma()
        {
            var line  = "'batman', 'bruce, wayne', 'gambit'";
            var items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce, wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }
コード例 #5
0
        public void CanParseNonQuotedListWithCommaSeparator()
        {
            var line  = "batman, bruce wayne, gambit";
            var items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }
コード例 #6
0
        public void CanParseQuotedListNewLine()
        {
            var line  = "'batman', 'bruce wayne', 'gambit'\r\n";
            var items = LexList.Parse(line);

            Assert.IsTrue(items.ContainsKey("batman"));
            Assert.IsTrue(items.ContainsKey("bruce wayne"));
            Assert.IsTrue(items.ContainsKey("gambit"));
        }