public void GivenADivision_WhenGetAllDivisions_ThenRepoReturnsAListOfDivisions() { //Given var options = new DbContextOptionsBuilder <ParkSharkContext>() .UseInMemoryDatabase("parkshark" + Guid.NewGuid().ToString("n")) .Options; var result = new List <Division>(); //When using (var context = new ParkSharkContext(options)) { IDivisionRepository divisionRepository = new DivisionRepository(context); result = divisionRepository.GetAllDivisions(); } //Then Assert.IsType <List <Division> >(result); }