Example #1
0
        public string CreateAddress(Address address, ResultsObject ro)
        {
            string addressId = string.Empty;
            string personId  = _apiClient.GetPersonId(ro.ReferenceNumber);

            if (!string.IsNullOrEmpty(personId))
            {
                bool otherActiveAddresses = _apiClient.CheckForOtherActiveAddresses(personId);

                if (otherActiveAddresses)
                {
                    _apiClient.SetOtherAddressesToInactive(ro);
                }

                addressId = _apiClient.CreateAddress(address, ro);
                if (!string.IsNullOrEmpty(addressId))
                {
                    _apiClient.CreatePersonAddress(addressId, personId, ro);
                }
            }
            return(addressId);
        }
        public void CreateAddress()
        {
            string newAddressId = _dataApiClient.CreateAddress(_testAddress, _testResultsObject);

            Assert.IsTrue(!string.IsNullOrEmpty(newAddressId));
        }