public void ReadAll_Returns_Workouts() { // Arrange var expectedWorkouts = new[] { new Workout { Name = "Test workout 01" }, new Workout { Name = "Test workout 02" }, new Workout { Name = "Test workout 03" } }; TrainingPlanContextMock.Workouts.AddRange(expectedWorkouts); TrainingPlanContextMock.SaveChanges(); // Act var result = RepositoryUnderTest.ReadAll(); // Assert Assert.Collection(result, workout => Assert.Same(expectedWorkouts[0], workout), workout => Assert.Same(expectedWorkouts[1], workout), workout => Assert.Same(expectedWorkouts[2], workout) ); }