Exemplo n.º 1
0
 public void ExecuteWithFileSet()
 {
     Task task = new Set();
     var command = new TaskCommand(task);
     // This will not actually select a file
     command.Context["file"] = "file";
     Assert.IsTrue(command.Execute() == 0);
 }
Exemplo n.º 2
0
 public void ExecuteWithFileNotProperlySet()
 {
     Task task = new Set();
     var command = new TaskCommand(task);
     command.Context["file"] = null;
     // Not selecting any file is not considered an error
     Assert.IsTrue(command.Execute() == 0);
 }
Exemplo n.º 3
0
 public void Task()
 {
     Task task = new Set();
     var command = new TaskCommand(task);
     Assert.AreEqual(task, command.Task);
 }
Exemplo n.º 4
0
 public void Execute()
 {
     Task task = new Set();
     var command = new TaskCommand(task);
     Assert.IsTrue(command.Execute() == 0);
 }
Exemplo n.º 5
0
 public void CommandToString()
 {
     Task task = new Set();
     var command = new TaskCommand(task);
     Assert.AreEqual("set", command.ToString());
 }
Exemplo n.º 6
0
        private bool Equals(TaskCommand taskCommand)
        {
            if (taskCommand == null)
            {
                return false;
            }

            if (!base.Equals(taskCommand))
            {
                return false;
            }

            return Equals(task, taskCommand.task);
        }