示例#1
0
        public void SyntaxFacts_Identifier_GetParenthesizedIdentifier_ReturnsIdentifier_AndEscapesClosingBrackets()
        {
            const string text     = "lorem [ipsum]";
            var          quoted   = SyntaxFacts.GetParenthesizedIdentifier(text);
            var          expected = "[" + text.Replace("]", "]]") + "]";

            Assert.Equal(expected, quoted);
        }
示例#2
0
        public void SyntaxFacts_Identifier_GetParenthesizedIdentifier_ReturnsIdentifier()
        {
            const string text     = "lorem ipsum";
            var          quoted   = SyntaxFacts.GetParenthesizedIdentifier(text);
            var          expected = "[" + text + "]";

            Assert.Equal(expected, quoted);
        }