Пример #1
0
 public void testEscapeIfRequired_singleQuote()
 {
     StringArgumentType.EscapeIfRequired("\"").Should().BeEquivalentTo("\"\\\"\"");
 }
Пример #2
0
 public void testEscapeIfRequired_multipleWords()
 {
     StringArgumentType.EscapeIfRequired("hello world").Should().BeEquivalentTo("\"hello world\"");
 }
Пример #3
0
 public void testEscapeIfRequired_quote()
 {
     StringArgumentType.EscapeIfRequired("hello \"world\"!").Should().BeEquivalentTo("\"hello \\\"world\\\"!\"");
 }
Пример #4
0
 public void testEscapeIfRequired_notRequired()
 {
     StringArgumentType.EscapeIfRequired("hello").Should().BeEquivalentTo("hello");
     StringArgumentType.EscapeIfRequired("").Should().BeEquivalentTo("");
 }