public QueenBeeService( ApiaryDiaryDbContext db, IBeehiveService beehiveService) { this.db = db; this.beehiveService = beehiveService; }
public InspectionService( ApiaryDiaryDbContext db, IBeehiveService beehiveService) { this.db = db; this.beehiveService = beehiveService; }
public ApiaryService( ApiaryDiaryDbContext db, ILocationInfoService locationInfoService) { this.db = db; this.locationInfoService = locationInfoService; }
public BeehiveService( ApiaryDiaryDbContext db, IApiaryService apiaryService) { this.db = db; this.apiaryService = apiaryService; }
public async Task ApiariesCountIsValid() { var options = new DbContextOptionsBuilder <ApiaryDiaryDbContext>() .UseInMemoryDatabase("DbTest").Options; using var db = new ApiaryDiaryDbContext(options); var locationService = new LocationInfoService(db); var apiaryService = new ApiaryService(db, locationService); var userId = "dasadadadadas"; var apiaryName = "Some appropriate name"; var capacity = 100; var apiaryId = await apiaryService.CreateAsync(userId, apiaryName, capacity); Assert.Equal(1, apiaryService.ApiariesCount()); }
public LocationInfoService(ApiaryDiaryDbContext db) { this.db = db; }