public RegionIntegrationHandler( IRegionIbgeRepository regionIbgeRepository, IHandler <CreateRegionCommand> handler) { this.regionIbgeRepository = regionIbgeRepository; this.handler = handler; }
public RegionDiffServices( IRegionIbgeRepository ibgeRepository, IRegionRepository repository) { this._ibgeRepository = ibgeRepository; this._repository = repository; }
public RegionIntegrationTests() { fakeRepository = new RegionRepository(new FakeContext()); handler = new RegionHandler(fakeRepository); _http = new HttpClient(); invalidRegionIbgeRepository = new RegionIbgeRepository(null); invalidIntegrationHandler = new RegionIntegrationHandler(invalidRegionIbgeRepository, handler); validRegionIbgeRepository = new RegionIbgeRepository(_http); validIntegrationHandler = new RegionIntegrationHandler(validRegionIbgeRepository, handler); }
public RegionDiffServicesTests() { httpClient = new HttpClient(); regionIbgeRepository = new RegionIbgeRepository(httpClient); context = new FakeContext(); regionRepository = new RegionRepository(context); context.Region.RemoveRange(regionRepository.Get()); local = new List <Region>() { new Region(1, "N", "Norte"), new Region(2, "NE", "Nordeste"), new Region(3, "SE", "Sudeste"), new Region(4, "S", "Sul"), new Region(5, "CO", "Centro-Oeste") }; local.ForEach(x => regionRepository.Create(x)); regionDiffServices = new RegionDiffServices(regionIbgeRepository, regionRepository); }