public void ShouldParseCommandWithFourPipes()
        {
            string openCommand           = "|setTextField|fieldName|fieldValue|";
            DefaultRemoteCommand command = DefaultRemoteCommand.Parse(openCommand);

            Assert.AreEqual("setTextField", command.Command);
            Assert.AreEqual("fieldName", command.Args[0]);
            Assert.AreEqual("fieldValue", command.Args[1]);
        }
 public void ShouldFailToParseCommandStringWithWhiteSpace()
 {
     DefaultRemoteCommand.Parse("  ");
 }
 public void ShouldFailToParseNullCommandString()
 {
     DefaultRemoteCommand.Parse(null);
 }
 public void ShouldFailToParseCommandStringWhichDoesNotStartWithAPipe()
 {
     DefaultRemoteCommand.Parse("command|blah|blah|blah|");
 }
 public void ShouldFailToParseCommandStringWithExtraPipes()
 {
     DefaultRemoteCommand.Parse("|command|blah|blah|blah|");
 }
 public void ShouldFailToParseCommandStringWithNoPipes()
 {
     DefaultRemoteCommand.Parse("junk");
 }
Пример #7
0
 public void ShouldFailToParseCommandStringWithWhiteSpace()
 {
     Assert.Throws <ArgumentException>(() => DefaultRemoteCommand.Parse("  "));
 }
Пример #8
0
 public void ShouldFailToParseNullCommandString()
 {
     Assert.Throws <ArgumentException>(() => DefaultRemoteCommand.Parse(null));
 }
Пример #9
0
 public void ShouldFailToParseCommandStringWhichDoesNotStartWithAPipe()
 {
     Assert.Throws <ArgumentException>(() => DefaultRemoteCommand.Parse("command|blah|blah|blah|"));
 }
Пример #10
0
 public void ShouldFailToParseCommandStringWithExtraPipes()
 {
     Assert.Throws <ArgumentException>(() => DefaultRemoteCommand.Parse("|command|blah|blah|blah|"));
 }
Пример #11
0
 public void ShouldFailToParseCommandStringWithNoPipes()
 {
     Assert.Throws <ArgumentException>(() => DefaultRemoteCommand.Parse("junk"));
 }