Основные методы
Основные методы
Основные методы
Основные методы
public async Task CreateReportTest() { var options = new DbContextOptionsBuilder <ApplicationDbContext>() .UseInMemoryDatabase(Guid.NewGuid().ToString()); var reportsRepository = new EfDeletableEntityRepository <Report>(new ApplicationDbContext(options.Options)); var service = new ReportsService(reportsRepository); await service.CreateReportAsync("Title1", "Description1", "course1", "User1"); await service.CreateReportAsync("Title2", "Description2", "course2", "User1"); var reports = reportsRepository.All(); Assert.Equal(2, reports.Count()); }