public async Task GetTest() { //Arrange using (var context = new AppDbContext(options)) { var producer = new Producer { Id = 1 }; var repo = new ProducerRepository(context); //Act var expectedResult = producer; context.Producers.Add(producer); var result = await repo.Get(producer.Id); //Assert Assert.AreEqual(expectedResult, result); } }