public void TestAddService() { var report = new ManageServiceController(new MemberList(), new ProviderList(), new ProviderDirectory(), new ServiceRecordList()); var service = new Service(222233, "handHealth", 150m); var result = report.AddService(service); Assert.IsTrue(result != null, "Failed to add a new service"); var delete = report.DeleteService(service.ServiceCode); Assert.IsTrue(delete, "Delete Fail!"); }
public void TestDeleteService() { var report = new ManageServiceController(new MemberList(), new ProviderList(), new ProviderDirectory(), new ServiceRecordList()); var serviceCode = 222244; var newService = new Service(serviceCode, "Consult", 50.50m); var success = report.AddService(newService); Assert.IsTrue(success != null, "add service failed."); var success1 = report.DeleteService(serviceCode); Assert.IsTrue(success1, "delete service failed."); }
public void TestGetAllServices() { var report = new ManageServiceController(new MemberList(), new ProviderList(), new ProviderDirectory(), new ServiceRecordList()); var service = new Service(222266, "consult", 50m); var result = report.AddService(service); Assert.IsTrue(result != null, "Failed to add a new service"); var services = report.GetAllServices(); Assert.IsTrue(null != services, "Failed to get all services"); var delete = report.DeleteService(service.ServiceCode); Assert.IsTrue(delete, "Delete Fail!"); }
public void TestUpdateService() { var report = new ManageServiceController(new MemberList(), new ProviderList(), new ProviderDirectory(), new ServiceRecordList()); var newService = new Service(222233, "Wash hair", 45m); var addresult = report.AddService(newService); Assert.IsTrue(null != addresult, "Adding Fail!"); var updateService = new Service(222233, "Wash Har", 30m); var updatedService = report.UpdateService(newService); Assert.IsTrue(updatedService != null, "Failed to update a service"); var deleteService = report.DeleteService(newService.ServiceCode); Assert.IsTrue(deleteService, "Fail to delete a service"); }