Ejemplo n.º 1
0
            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");
            }
Ejemplo n.º 2
0
 public static void GetPermitInfo()
 {
     if (PIs != null)
     {
         PI = PIs[0];
     }
     else
     {
         PI = new uk.gov.defra.Phoenix.BO.Application.BOPermitInfo(5);
     }
 }
Ejemplo n.º 3
0
            public void SubmittedByCustomerToProgressAllowed_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();

                PI.PermitStatus = new BO.ReferenceData.BOPermitStatus((int)BOPermitInfo.PermitStatusTypes.SubmittedByCustomer);
                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");
                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");
            }