public void AddCustomerShouldAdd() { //arrange var options = new DbContextOptionsBuilder <SoilMatesContext>().UseInMemoryDatabase("AddCustomerShouldAdd").Options; using var testContext = new SoilMatesContext(options); repo = new DBrepo(testContext); //act repo.AddCustomer(testCustomer); //assert using var assertContext = new SoilMatesContext(options); Assert.NotNull(assertContext.Customers.SingleAsync(n => n.Name == testCustomer.Name)); }