Ejemplo n.º 1
0
        public void SurroundWithDoubleQuotesWhenAlreadySurroundedDoesNothing(string input)
        {
            var escapedInput = "\"" + input + "\"";
            var result       = TestCommandParser.SurroundWithDoubleQuotes(escapedInput);

            result.Should().Be(escapedInput);
        }
Ejemplo n.º 2
0
        public void SurroundWithDoubleQuotesHandlesCorrectlyOddCountOfTrailingBackslashes(string input)
        {
            var result = TestCommandParser.SurroundWithDoubleQuotes(input);

            result.Should().Be("\"" + input + "\\\"");
        }
Ejemplo n.º 3
0
        public void SurroundWithDoubleQuotesWhenNotSurroundedSurrounds(string input)
        {
            var result = TestCommandParser.SurroundWithDoubleQuotes(input);

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