public void AddOrderProductShouldAdd() { //arrange var options = new DbContextOptionsBuilder <SoilMatesContext>().UseInMemoryDatabase("AddOrderProductShoudAdd").Options; using var testContext = new SoilMatesContext(options); repo = new DBrepo(testContext); //act repo.AddOrderProduct(testOrderProduct); //assert using var assertContext = new SoilMatesContext(options); Assert.NotNull(assertContext.OrderProducts.SingleAsync(n => n.Id == testOrderProduct.Id)); }