public void BeingCaseOfficerToProgressAllowed_ByCaseOfficer() { //Get The Additional Information Object AdditionalInformation_ProgressAllowed AdditionalInformation = new AdditionalInformation_ProgressAllowed((int)BOPermitInfo.PermitStatusTypes.ProgressAllowed); Assert.IsTrue(Common.IsInRole(_ssoCaseOfficerUserId, Common.RolesList.CaseOfficer), "You need to change your Role in SSO to be a Case Officer"); GetPermitInfo(); //set the current status and who the permit is currently asigned to PI.PermitStatus = new BO.ReferenceData.BOPermitStatus((int)BOPermitInfo.PermitStatusTypes.BeingInput_CaseOfficer); PI.AssignedTo = new BO.ReferenceData.BOStatusAssignedToGroup((int)Common.AssignedToList.CaseOfficer); try { Console.WriteLine("About to save"); PI.Save(_ssoCaseOfficerUserId); } catch (System.ArgumentNullException ex) { Console.WriteLine(ex.ToString()); } Console.WriteLine("Saved PI"); bool Success = BOPermitInfo.ChangeStatus(PI.PermitInfoId, (int)Common.AssignedToList.CaseOfficer, _ssoCaseOfficerUserId, AdditionalInformation); Assert.IsTrue(Success, "Status change Failed"); PI = new uk.gov.defra.Phoenix.BO.Application.BOPermitInfo(5); Assert.IsTrue((PI.AssignedTo.ID == (int)Common.AssignedToList.CaseOfficer && PI.PermitStatus.ID == (int)BOPermitInfo.PermitStatusTypes.ProgressAllowed), "State Has not Changed Correctly"); }
public void ProgressAllowedToCancelled_ByCaseOfficer() { //Get The Additional Information Object AdditionalInformation_UC220 AdditionalInformation = new AdditionalInformation_UC220((int)BOPermitInfo.PermitStatusTypes.Cancelled); Assert.IsTrue(Common.IsInRole(_ssoCaseOfficerUserId, Common.RolesList.CaseOfficer), "You need to change your Role in SSO to be a Case Officer"); GetPermitInfo(); PI.PermitStatus = new BO.ReferenceData.BOPermitStatus((int)BOPermitInfo.PermitStatusTypes.ProgressAllowed); PI.AssignedTo = new BO.ReferenceData.BOStatusAssignedToGroup((int)Common.AssignedToList.CaseOfficer); PI.Save(_ssoCaseOfficerUserId); Console.WriteLine("Saved PI"); bool Success = BOPermitInfo.ChangeStatus(PI.PermitInfoId, (int)Common.AssignedToList.CaseOfficer, _ssoCaseOfficerUserId, AdditionalInformation); Assert.IsTrue(Success, "Status change Failed"); GetPermitInfo(); Assert.IsTrue((PI.AssignedTo.ID == (int)Common.AssignedToList.CaseOfficer && PI.PermitStatus.ID == (int)BOPermitInfo.PermitStatusTypes.Cancelled), "State Has not Changed Correctly"); }
public Patient Save() { Person.Save(); IService.SavePatient(this); PI.Patient = this; PI.Save(); return(this); }
public void BeingInputByCustomerToSubmittedByCustomer_ByCustomer() { //Get The Additional Information Object AdditionalInformation_SubmittedByCustomer AdditionalInformation = new AdditionalInformation_SubmittedByCustomer((int)BOPermitInfo.PermitStatusTypes.SubmittedByCustomer); Assert.IsTrue(Common.IsInRole(_ssoCaseOfficerUserId, Common.RolesList.Customer), "You need to change your Role in SSO to be a Customer"); GetPermitInfo(); PI.PermitStatus = new BO.ReferenceData.BOPermitStatus((int)BOPermitInfo.PermitStatusTypes.BeingInput_Customer); PI.AssignedTo = new BO.ReferenceData.BOStatusAssignedToGroup((int)Common.AssignedToList.Customer); PI.Save(_ssoCaseOfficerUserId); Console.WriteLine("Saved PI"); bool Success = BOPermitInfo.ChangeStatus(PI.PermitInfoId, (int)Common.AssignedToList.Customer, _ssoCaseOfficerUserId, AdditionalInformation); Assert.IsTrue(Success, "Status change Failed"); PI = new uk.gov.defra.Phoenix.BO.Application.BOPermitInfo(5); Assert.IsTrue((PI.AssignedTo.ID == (int)Common.AssignedToList.Customer && PI.PermitStatus.ID == (int)BOPermitInfo.PermitStatusTypes.SubmittedByCustomer), "State Has not Changed Correctly"); }