public void queryUCRNCitizenDetailsOnly() { queryUCRNRequest1 myQueryUCRNRequest = new queryUCRNRequest1(CallerToken, Forename, Surname, DoB, Gender); MyGovScot.MyAccount.QueryUCRNService.CitizenDetails myCitizenDetail = (MyGovScot.MyAccount.QueryUCRNService.CitizenDetails)myQueryUCRNRequest.queryUCRN.queryUCRNRequest.RequestBody.Item; Assert.AreEqual(Forename, myCitizenDetail.Name.FirstName); Assert.AreEqual(Surname, myCitizenDetail.Name.LastName); Assert.AreEqual(DoB, myCitizenDetail.DateOfBirth); Assert.AreEqual(Gender, myCitizenDetail.Gender); }
public void queryUCRNTypeTSpecified() { queryUCRNRequest1 myQueryUCRNRequest = new queryUCRNRequest1(CallerToken, UCRN, true, MyGovScot.MyAccount.QueryUCRNService.UCRNTypeUCRNType.T); queryUCRN myQueryUCRN = myQueryUCRNRequest.queryUCRN; MyGovScot.MyAccount.QueryUCRNService.UCRNType myUCRNType = (MyGovScot.MyAccount.QueryUCRNService.UCRNType)myQueryUCRN.queryUCRNRequest.RequestBody.Item; MyGovScot.MyAccount.QueryUCRNService.UCRNType TestUCRNType = new MyGovScot.MyAccount.QueryUCRNService.UCRNType(); TestUCRNType.Value = UCRN; TestUCRNType.UCRNType1Specified = true; Assert.AreEqual(CallerToken, myQueryUCRNRequest.queryUCRN.CallerToken); TestUCRNType.UCRNType1 = MyGovScot.MyAccount.QueryUCRNService.UCRNTypeUCRNType.T; Assert.AreEqual(TestUCRNType.Value, myUCRNType.Value); Assert.AreEqual(UCRN, myUCRNType.Value); Assert.AreEqual(TestUCRNType.UCRNType1Specified, myUCRNType.UCRNType1Specified); Assert.AreEqual(TestUCRNType.UCRNType1, myUCRNType.UCRNType1); }
public void queryUCRNTypePSpecified() { //Create an Instance of the queryUCRNWrapper Class //MyAccount.queryUCRNWrapper myQueryUCRNwrapper = new queryUCRNWrapper(); //Create a queryUCRNRequest1 using the method on the wrapper class queryUCRNRequest1 myQueryUCRNRequest = new queryUCRNRequest1(CallerToken, UCRN, true, MyGovScot.MyAccount.QueryUCRNService.UCRNTypeUCRNType.P); //queryUCRN myQueryUCRN = new queryUCRN(); MyGovScot.MyAccount.QueryUCRNService.UCRNType myUCRNType = (MyGovScot.MyAccount.QueryUCRNService.UCRNType)myQueryUCRNRequest.queryUCRN.queryUCRNRequest.RequestBody.Item; MyGovScot.MyAccount.QueryUCRNService.UCRNType TestUCRNType = new QueryUCRNService.UCRNType(); TestUCRNType.Value = UCRN; TestUCRNType.UCRNType1Specified = true; TestUCRNType.UCRNType1 = myUCRNTypeType; // Check that the Caller Token Value matches the string value set Assert.AreEqual(CallerToken, myQueryUCRNRequest.queryUCRN.CallerToken); Assert.AreEqual(TestUCRNType.Value, myUCRNType.Value); Assert.AreEqual(UCRN, myUCRNType.Value); Assert.AreEqual(TestUCRNType.UCRNType1Specified, myUCRNType.UCRNType1Specified); Assert.AreEqual(TestUCRNType.UCRNType1, myUCRNType.UCRNType1); }