Exemplo n.º 1
0
    public void Button_Pass()
    {
      var cmd = new Cmd.ValidateItem();
      InitCommand(cmd);
      _context.CurrentItem = _itemPassing;
      cmd.ModeButton = true;

      var result = cmd.Run();
      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));
    }
Exemplo n.º 2
0
    public void Workflow_Fail_ByID()
    {
      var cmd = new Cmd.ValidateItem();
      InitCommand(cmd);
      _context.CurrentItem = _database.GetRootItem();
      cmd.ModeGutter = true;
      cmd.Path = _itemFailing.ID.ToString();

      var result = cmd.Run();
      Assert.That(result.Status, Is.EqualTo(CommandStatus.Failure));
    }
Exemplo n.º 3
0
    public void All_Fail()
    {
      var cmd = new Cmd.ValidateItem();
      InitCommand(cmd);
      _context.CurrentItem = _itemFailing;

      var result = cmd.Run();
      Assert.That(result.Status, Is.EqualTo(CommandStatus.Failure));
    }
Exemplo n.º 4
0
    public void Bar_Pass_ByPath()
    {
      var cmd = new Cmd.ValidateItem();
      InitCommand(cmd);
      _context.CurrentItem = _testRoot.Parent;
      cmd.ModeBar = true;
      cmd.Path = _testRoot.Name + "/" + _itemPassing.Name;

      var result = cmd.Run();
      Assert.That(result.Status, Is.EqualTo(CommandStatus.Success));
    }