Exemplo n.º 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 CreatePersonAddress()
        {
            string personAddressId = _dataApiClient.CreatePersonAddress(_testAddressId, _testPersonId, _testResultsObject);

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