SenseNet / sensenet

Open Source Content Services Platform written in .NET
https://sensenet.com
GNU General Public License v2.0
173 stars 112 forks source link

CqlParser unit tests #133

Closed borsi closed 7 years ago

borsi commented 7 years ago

Tests only for SnQuery AST (SenseNet.Search.Parser.SnQueryPredicate class and SenseNet.Search.Parser.Predicates namespace). 150-200 unit tests partially from old version e.g. budapest branch or latest release:

$/SenseNet/Releases/enterprise/v6.5/servicepack/Source/SenseNet/Tests/LuceneParser/ParserTest.cs.

Acceptance criteria

tusmester commented 7 years ago

@kavics please add more info about what to review (e.g. test project, class).

kavics commented 7 years ago

I would like to know that there is enough test case and the basic test methods are valid e.g. these: private SnQuery Test(string queryText, string expected = null) and private void TestError(string queryText) in the SenseNet.Search.Tests.CqlParserTests.

tusmester commented 7 years ago

Looks OK 👍 to me. Although I haven't seen tests for these two (very) corner cases for query text:

(the latter may happen if you construct the query text from different sources)

kavics commented 7 years ago

I wrote 4 additional tests containing 148 test cases: **Search_Parser_AstToString_MultiBool* and a control method: BoolTest**. These cover all mentioned missing topics.