public async Task DeleteTownAsyncShouldReturnFalse() { var townRepo = new Repository <Town>(db); var useFullCategory = new Repository <UseFullCategory>(db); var companyRepo = new Repository <Company>(db); var townUseFullCategoriesRepo = new Repository <TownUseFullCategory>(db); var useFullCategoryService = new UseFullCategoryService(useFullCategory, townRepo, townUseFullCategoriesRepo, companyRepo); var townService = new TownService(townRepo, townUseFullCategoriesRepo, useFullCategoryService, companyRepo); await townService.CreateTownByNameAsync("Test"); var isDeleted = await townService.DeleteTownAsync(new TownDeleteDtoModel { TownId = 2, }); Assert.False(isDeleted); }