Example #1
0
 public void Initialize()
 {
     Data = new List <UrbanizationByState> {
         urbStateOne, urbStateTwo, urbStateThree
     };
     _ServiceCollection = new ServiceCollection();
     _ServiceCollection.AddSingleton(MockDbContextFactory.CreateMockDbContext(Data));
     _ServiceCollection.AddSingleton <IUrbanizationByStateStore, UrbanizationByStateStore>();
     _ServiceCollection.AddSingleton <IUrbanizationByStateService, UrbanizationByStateService>();
     _UrbStateService = _ServiceCollection.BuildServiceProvider().GetRequiredService <IUrbanizationByStateService>();
 }
Example #2
0
 public UrbanizationController(IUrbanizationByStateService urbanizationByStateService, ILogger <UrbanizationController> logger)
 {
     _UrbanizationByStateService = urbanizationByStateService;
     _logger = logger;
 }