예제 #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));
 }