public async Task PaymentDetailsTest() { var optionBuilder = new DbContextOptionsBuilder <ApplicationDbContext>() .UseInMemoryDatabase("testDb"); var dbContext = new ApplicationDbContext(optionBuilder.Options); var service = new PaymentsService(dbContext); var payment = new PaymentsInputViewModel { Date = DateTime.UtcNow.Date, PaymentSource = "каса", Value = 100 }; await service.CreateAsync(payment); var result = service.DetailsAsync(1); Assert.True(result.IsCompletedSuccessfully); Assert.NotNull(result); }