public void ReadAllAddress() { var options = TestDbContext.TestDbInitalizer("Read All Addresses"); //Create Instance of DB. //Insert data into test database using (var dbcreate = TestDbContext.CreateTestDb(options)) { dbcreate.AddRange( AddressTestData.ValidAddress1(), AddressTestData.ValidAddress2()); dbcreate.SaveChanges(); } using (var dbcreate = TestDbContext.CreateTestDb(options)) { var AddressExpected = new AddressRepository(dbcreate).ReadAll(); var count = AddressExpected.Count(); Assert.Equal(2, count); } }