public void SearchByErrorLevel_Shold_Return_Right_Values(string errorLevel) { // Arrange var context = GenerateContext("SearchByLevel"); var service = new ErrorService(context); var expected = context.Errors .Where(x => x.Level.Name == errorLevel) .ToList(); // Act var result = service.SearchByErrorLevel( errorLevel); // Assert Assert.Equal(result.Count, expected.Count); }