public void ANonApproverCannnotRejectLeave() { var leave = new LeaveItem { Status = LeaveItemStatus.AwaitingApproval }; var approver = new User { IsApprover = false }; var sut = CreateSut(approver); sut.Reject(leave); Assert.AreEqual(LeaveItemStatus.AwaitingApproval, leave.Status); }
public void AnApproverCanApproveLeave() { var leave = new LeaveItem { Status = LeaveItemStatus.AwaitingApproval }; var approver = new User { IsApprover = true }; var sut = CreateSut(approver); sut.Approve(leave); Assert.AreEqual(LeaveItemStatus.Approved, leave.Status); }