public void GetCountryById_ExistingId_ShouldReturnValue(int countryId) { using (var scope = _iContainer.BeginLifetimeScope(AppContextType.UnitTest.ToString())) { _iCountryDal = scope.Resolve <ICountryDal>(); var country = _iCountryDal.GetCountryById(countryId); Assert.True(country != null); } }
public void GetCountries_GetAll_ShouldReturnListOfCounties() { using (var scope = _iContainer.BeginLifetimeScope(AppContextType.UnitTest.ToString())) { _iCountryDal = scope.Resolve <ICountryDal>(); var countryList = _iCountryDal.GetCountries(); Assert.True(countryList.Count > 0); } }
public void SaveCountry_DeleteExistingCountry_ShouldDeleteSuccessfully(string name) { using (var scope = _iContainer.BeginLifetimeScope(AppContextType.UnitTest.ToString())) { _iCountryDal = scope.Resolve <ICountryDal>(); var country = _iCountryDal.GetCountryByName(name); country = _iCountryDal.SaveCountry(country, true); Assert.True(country != null); } }
public void SaveCountry_NewCountry_ShouldSaveSuccessfully(string name) { using (var scope = _iContainer.BeginLifetimeScope(AppContextType.UnitTest.ToString())) { _iCountryDal = scope.Resolve <ICountryDal>(); var country = new Country { Name = name }; country = _iCountryDal.SaveCountry(country); Assert.True(country != null); } }
public CountryManager(ICountryDal countryDal) { _countryDal = countryDal; }
public CountryManager(ICountryDal countryDal, IUnitOfWork unitOfWork) : base(countryDal, unitOfWork) { _countryDal = countryDal; _unitOfWork = unitOfWork; }
public CountryManager(ICountryDal CountryDal) { _CountryDal = CountryDal; }
public AddressManager(ICountryDal countryDal, ICityDal cityDal, IDistrictDal districtDal) { _countryDal = countryDal; _cityDal = cityDal; _districtDal = districtDal; }
public CountriesService(ICountryDal countryDal) { _countryDal = countryDal; }
public CountryManager(ICountryDal countryDal, IQueryableRepository <Country> queryableRepository) { _countryDal = countryDal; _queryableRepository = queryableRepository; }
public CountryController(ICountryDal iCountryDal) { _iCountryDal = iCountryDal; }
public DefinitionManager(ICityDal cityDal, ICountryDal countryDal) { _cityDal = cityDal; _countryDal = countryDal; }