public void DeleteAddressTest()
 {
     AddressDataManager target = new AddressDataManager(); // TODO: Initialize to an appropriate value
     AddressDto dto = null; // TODO: Initialize to an appropriate value
     target.DeleteAddress(dto);
     Assert.Inconclusive("A method that does not return a value cannot be verified.");
 }
Example #2
0
 public static int UpdateAddress(Address address)
 {
     try
     {
         using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
         {
             int save;
             address = insertNewCityAndNewStreet(address);
             if (address.Id > 0)
             {
                 save = AddressDataManager.UpdateAddress(address);
             }
             else
             {
                 save = address.Id = AddressDataManager.InsertAddress(address);
             }
             scope.Complete();
             return(save);
         }
     }
     catch (Exception ex)
     {
         _logger.Debug($"Failed to update adddress {address.Id}", ex);
         throw;
     }
 }
            private EntityDataServiceResponse <SupportedLanguage> GetLanguages(GetSupportedLanguagesDataRequest request)
            {
                AddressDataManager addressDataManager = this.GetDataManagerInstance(request.RequestContext);

                PagedResult <SupportedLanguage> languages = addressDataManager.GetLanguages(request.QueryResultSettings);

                return(new EntityDataServiceResponse <SupportedLanguage>(languages));
            }
 public void GetAllAddressesTest()
 {
     AddressDataManager target = new AddressDataManager(); // TODO: Initialize to an appropriate value
     List<AddressDto> expected = null; // TODO: Initialize to an appropriate value
     List<AddressDto> actual;
     actual = target.GetAllAddresses();
     Assert.AreEqual(expected, actual);
     Assert.Inconclusive("Verify the correctness of this test method.");
 }
Example #5
0
 static public Address GetAddress(int id)
 {
     try
     {
         Address address = AddressDataManager.GetAddress(id);
         address.Country = CountryDataManager.GetCountry(address.Country.Id);
         address.City    = CityDataManager.GetCity(address.City.Id);
         address.Street  = StreetDataManager.GetStreet(address.Street.Id);
         return(address);
     }
     catch (Exception ex)
     {
         _logger.Debug($"Failed to get adddress {id}.", ex);
         throw;
     }
 }
Example #6
0
 public static int InsertAddress(Address address)
 {
     try
     {
         using (TransactionScope scope = new TransactionScope(TransactionScopeAsyncFlowOption.Enabled))
         {
             address = insertNewCityAndNewStreet(address);
             int insert = AddressDataManager.InsertAddress(address);
             scope.Complete();
             return(insert);
         }
     }
     catch (Exception ex)
     {
         _logger.Debug("Failed to insert adddress", ex);
         throw;
     }
 }
 public void AddressDataManagerConstructorTest()
 {
     AddressDataManager target = new AddressDataManager();
     Assert.Inconclusive("TODO: Implement code to verify target");
 }