コード例 #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));
 }