public void SearchByEnviroment_Shold_Return_Right_Values(int enviromentId) { // Arrange var context = GenerateContext("SearchByEnviroment"); var service = new ErrorService(context); var expected = context.Errors .Where(x => x.EnviromentId == enviromentId) .ToList(); // Act var result = service.SearchByEnviroment( enviromentId); // Assert Assert.Equal(result.Count, expected.Count); }