public void GetAllModelsByMake_ShouldReturnCorrectValue() { //Arrange var sut = new CarModelRepository(_mockContext.Object); var expectedCarModels = new List <CarModel>() { new CarModel() { Id = 2, ModelName = "m2" }, new CarModel() { Id = 4, ModelName = "m4" } }; //Act var returnedValue = sut.GetAllModelsByMake(2); //Assert Assert.IsType <List <CarModel> >(returnedValue); Assert.Equal(expectedCarModels.Count, returnedValue.Count); Assert.Equal(expectedCarModels, returnedValue, new CarModelComparator()); }