public registrationRequest1(string CallerToken, string Forename, string Surname, GenderType Gender, DateTime DoB, string UPRN)
        {
            registration myRegistration = new registration();

            myRegistration.CallerToken = CallerToken;
            RegistrationRequest myRegistrationRequest = new RegistrationRequest();

            myRegistrationRequest.RequestBody = new RequestBody();
            CitizenDetails myCitizenDetails = new CitizenDetails();

            myCitizenDetails.DateOfBirth = DoB;
            myCitizenDetails.Gender      = Gender;
            Name myName = new Name();

            myName.FirstName      = Forename;
            myName.LastName       = Surname;
            myCitizenDetails.Name = new Name();
            myCitizenDetails.Name = myName;

            UPRNType myUPRNType = new UPRNType();

            myUPRNType.Value = UPRN;
            myUPRNType.UPRNType1Specified = false;

            myRegistrationRequest.RequestBody.Item  = myCitizenDetails;
            myRegistrationRequest.RequestBody.Item1 = myUPRNType;
            myRegistration.registrationRequest      = myRegistrationRequest;
            this.registration = myRegistration;
        }
        public registrationRequest1(string CallerToken, string Forename, string Surname, GenderType Gender, DateTime DoB, string add1, string add2, string add3, string town, string postcode, Int64 LACode)
        {
            registration myRegistration = new registration();

            myRegistration.CallerToken                     = CallerToken;
            myRegistration.registrationRequest             = new RegistrationRequest();
            myRegistration.registrationRequest.RequestBody = new RequestBody();
            CitizenDetails myCitizenDetails = new CitizenDetails();

            myCitizenDetails.DateOfBirth = DoB;
            myCitizenDetails.Gender      = Gender;
            Name myName = new Name();

            myName.FirstName      = Forename;
            myName.LastName       = Surname;
            myCitizenDetails.Name = new Name();
            myCitizenDetails.Name = myName;
            AddressInput myAddressDetails = new MyGovScot.MyAccount.Registration.AddressInput();

            myAddressDetails.AddressLine = new MyGovScot.MyAccount.Registration.AddressLine();


            myAddressDetails.LACode   = LACode;
            myAddressDetails.PostCode = postcode;
            myAddressDetails.Town     = town;
            myAddressDetails.AddressLine.AddressLine1 = add1;
            myAddressDetails.AddressLine.AddressLine2 = add2;
            myAddressDetails.AddressLine.AddressLine3 = add3;

            myRegistration.registrationRequest.RequestBody.Item  = myCitizenDetails;
            myRegistration.registrationRequest.RequestBody.Item1 = myAddressDetails;
            //myRegistration.registrationRequest = myRegistrationRequest;
            this.registration = myRegistration;
        }
        public void registerCitizenDetailsUPRN()
        {
            registrationRequest1 myRegistrationRequest = new registrationRequest1(CallerToken, Forename, Surname, Gender, DoB, UPRN);

            Assert.AreEqual(CallerToken, myRegistrationRequest.registration.CallerToken);
            MyGovScot.MyAccount.Registration.CitizenDetails myCitizenDetails = (MyGovScot.MyAccount.Registration.CitizenDetails)myRegistrationRequest.registration.registrationRequest.RequestBody.Item;
            MyGovScot.MyAccount.Registration.UPRNType       myUPRN           = (MyGovScot.MyAccount.Registration.UPRNType)myRegistrationRequest.registration.registrationRequest.RequestBody.Item1;

            Assert.AreEqual(myCitizenDetails.Name.FirstName, Forename);
            Assert.AreEqual(myCitizenDetails.Name.LastName, Surname);
            Assert.AreEqual(myCitizenDetails.DateOfBirth, DoB);
            Assert.AreEqual(myCitizenDetails.Gender, Gender);
            Assert.AreEqual(myUPRN.Value, UPRN);
        }
        public void registerCitizenandAddressDetails()
        {
            registrationRequest1 myRegistrationRequest = new registrationRequest1(CallerToken, Forename, Surname, Gender, DoB, add1, add2, add3, town, postcode, 2222);

            Assert.AreEqual(CallerToken, myRegistrationRequest.registration.CallerToken);
            MyGovScot.MyAccount.Registration.CitizenDetails myCitizenDetails = (MyGovScot.MyAccount.Registration.CitizenDetails)myRegistrationRequest.registration.registrationRequest.RequestBody.Item;
            AddressInput myAddressInput = (AddressInput)myRegistrationRequest.registration.registrationRequest.RequestBody.Item1;

            Assert.AreEqual(myCitizenDetails.Name.FirstName, Forename);
            Assert.AreEqual(myCitizenDetails.Name.LastName, Surname);
            Assert.AreEqual(myCitizenDetails.DateOfBirth, DoB);
            Assert.AreEqual(myCitizenDetails.Gender, Gender);
            Assert.AreEqual(myAddressInput.AddressLine.AddressLine1, add1);
            Assert.AreEqual(myAddressInput.AddressLine.AddressLine2, add2);
            Assert.AreEqual(myAddressInput.AddressLine.AddressLine3, add3);
            Assert.AreEqual(myAddressInput.Town, town);
            Assert.AreEqual(myAddressInput.PostCode, postcode);
        }