Ejemplo n.º 1
0
        public void EditPtoRequestTest()
        {
            PaidTimeOff ptoRequest = new PaidTimeOff()
            {
                EmpID = 6,
                Date = new DateTime(2015, 07, 15),
                HoursRequested = 4

            };
            PaidTimeOffRepository repo = new PaidTimeOffRepository();
            repo.EditPtoRequest(ptoRequest);

        }
        public void EditPtoRequestTest()
        {
            //tests against DB; altered test app config setting
            var ops = OperationsFactory.CreatePaidTimeOffOperations();
            PaidTimeOff ptoRequest = new PaidTimeOff()
            {
                PtoRequestID = 1,
                PtoStatus = "Approved",
                EmpID = 5,
                Date = new DateTime(2015, 07, 15),
                HoursRequested = 4,
                ManagerID = 2,
                ReasonRejected = "N/A"

            };
            PaidTimeOffRepository repo = new PaidTimeOffRepository();
            repo.EditPtoRequest(ptoRequest);
            var response = new Response<List<PaidTimeOff>>();
            response = ops.ViewAllPtoRequests();
            PaidTimeOff updatedPto = response.Data.FirstOrDefault(p => p.PtoRequestID == 1);
            Assert.AreEqual("Approved", updatedPto.PtoStatus);
        }
Ejemplo n.º 3
0
 public void EditPtoRequest(PaidTimeOff ptoRequest)
 {
     var repo = new PaidTimeOffRepository();
     repo.EditPtoRequest(ptoRequest);
 }