public void ShouldNotBeValidWithWrongEmployee() { var order = new ExpenseReport(); order.Status = ExpenseReportStatus.Draft; var employee = new Employee(); order.Submitter = employee; var command = new DraftingCommand(); Assert.That(command.IsValid(new ExecuteTransitionCommand(order, null, new Employee(), new DateTime())), Is.False); }
public void ShouldBeValid() { var order = new ExpenseReport(); order.Status = ExpenseReportStatus.Draft; var employee = new Employee(); order.Submitter = employee; var command = new DraftingCommand(order, employee); Assert.That(command.IsValid(), Is.True); }
public void ShouldNotBeValidInWrongStatus() { var order = new ExpenseReport(); order.Status = ExpenseReportStatus.Submitted; var employee = new Employee(); order.Submitter = employee; var command = new DraftingCommand(order, employee); Assert.That(command.IsValid(), Is.False); }
public void ShouldNotBeValidInWrongStatus() { var report = new ExpenseReport(); report.Status = ExpenseReportStatus.Submitted; var employee = new Employee(); report.Submitter = employee; var command = new DraftingCommand(); Assert.That(command.IsValid(new ExecuteTransitionCommand(report, null, employee, new DateTime())), Is.False); }