示例#1
0
        public void SurroundWithDoubleQuotesWhenAlreadySurroundedDoesNothing(string input)
        {
            var escapedInput = "\"" + input + "\"";
            var result       = TestCommandParser.SurroundWithDoubleQuotes(escapedInput);

            result.Should().Be(escapedInput);
        }
示例#2
0
        public void SurroundWithDoubleQuotesHandlesCorrectlyOddCountOfTrailingBackslashes(string input)
        {
            var result = TestCommandParser.SurroundWithDoubleQuotes(input);

            result.Should().Be("\"" + input + "\\\"");
        }
示例#3
0
        public void SurroundWithDoubleQuotesWhenNotSurroundedSurrounds(string input)
        {
            var result = TestCommandParser.SurroundWithDoubleQuotes(input);

            result.Should().Be("\"" + input + "\"");
        }
示例#4
0
 public void SurroundWithDoubleQuotesWithNullThrows()
 {
     Assert.Throws <ArgumentNullException>(() =>
                                           TestCommandParser.SurroundWithDoubleQuotes(null));
 }