Example #1
0
        public void manager_approve_leave_chain_by_ChainOfResponsibility()
        {
            ManagerHandler manager        = new Manager("Manager");
            ManagerHandler director       = new DirectorManager("Director");
            ManagerHandler generalManager = new GeneralManager("GenerManager");

            manager.SetUpManager(director);
            director.SetUpManager(generalManager);

            var request = new LeaveRequest();

            request.Name = "Harry";
            request.Days = 1;
            manager.ApplyLeaveRequest(request);

            request.Days = 4;
            manager.ApplyLeaveRequest(request);

            request.Days = 7;
            manager.ApplyLeaveRequest(request);
        }
Example #2
0
 abstract public void ApplyLeaveRequest(LeaveRequest leaveRequest);