public void ReaderRepository_GetAllWithDetails_ReturnAllValues() { using (var context = new LibraryDbContext(_options)) { //arrange var readerRepository = new ReaderRepository(context); //act var readers = readerRepository.GetAllWithDetails().ToList(); //assert Assert.AreEqual(2, readers.Count); Assert.IsNotNull(readers[0].ReaderProfile); Assert.AreEqual("The night's watch", readers[0].ReaderProfile.Address); Assert.AreEqual("golub", readers[0].ReaderProfile.Phone); } }