コード例 #1
0
        public void ShouldEscapeQuestionMarks()
        {
            var g = new ColumnHeaderKeywordEscapingStrategy();
            var escaped = g.Escape("When?");

            Assert.AreEqual("[When?]", escaped);
        }
コード例 #2
0
        public void ShouldEscapeOnlyKeyword()
        {
            var g = new ColumnHeaderKeywordEscapingStrategy();
            var escaped = g.Escape(new string[] {"other","database"});

            Assert.AreEqual(new string[]{"other","[database]"}, escaped);
        }
コード例 #3
0
        public void ShouldEscapeASpace()
        {
            var g = new ColumnHeaderKeywordEscapingStrategy();
            var escaped = g.Escape("What happened");

            Assert.AreEqual("[What happened]", escaped);
        }
コード例 #4
0
        public void ShouldNotEscapeOther()
        {
            var g = new ColumnHeaderKeywordEscapingStrategy();
            var escaped = g.Escape("other");

            Assert.AreEqual("other", escaped);
        }
コード例 #5
0
        public void ShouldEscapeDatabase()
        {
            var g = new ColumnHeaderKeywordEscapingStrategy();
            var escaped = g.Escape("database");

            Assert.AreEqual("[database]", escaped);
        }
コード例 #6
0
        public void ShouldEscapeUser()
        {
            var g = new ColumnHeaderKeywordEscapingStrategy();
            var escaped = g.Escape("user");

            Assert.AreEqual("[user]", escaped);
        }
コード例 #7
0
        public void ShouldEscapeMixedCaseGroup()
        {
            var g = new ColumnHeaderKeywordEscapingStrategy();
            var escaped = g.Escape("Group");

            Assert.AreEqual("[Group]", escaped);
        }
コード例 #8
0
        public void ShouldEscapeSlashes()
        {
            var g = new ColumnHeaderKeywordEscapingStrategy();
            var escaped = g.Escape("Today/Tomorrow");

            Assert.AreEqual("[Today/Tomorrow]", escaped);
        }