コード例 #1
0
    public void MissingCommand()
    {
      var cmd = new Cmd.SimpleConditional();
      InitCommand(cmd);

      cmd.Expression = "a = a";

      var result = cmd.Run();

      Assert.That(result.Status, Is.EqualTo(CommandStatus.Failure));
    }
コード例 #2
0
    public void NotPasses()
    {
      var cmd = new Cmd.SimpleConditional();
      InitCommand(cmd);

      cmd.Expression = "a != a";
      cmd.Command = "echo ok";

      var result = cmd.Run();

      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));
      Assert.That(result.Message, Is.Empty);
    }