class: TestQueryParser

public class: TestQueryParser
Author: Markus Haarlaender (initial creation)
Project: Phase: 1.0; Status: Proposed; Version: $Revision$ $LastChangedDate$; Complexity: 1
Dates: Created: 16.07.2009 15:19:54; Modified: 16.07.2009 15:19:54;
Flags: Active: false; IsRoot: false; IsLeaf: false;
Extension Points:
UUID: {B521C021-757B-48fe-A49A-21428250760D}
Unit testing class for QueryParser.
 

Goto: Custom Properties, Fields, Methods

Appears in: search

Custom Properties
 
TestQueryParser Attributes
Attribute Details
private Logger
  logger
Initial: Logger.getLogger(TestQueryParser.class)
 
TestQueryParser Methods
Operation Details
public
testQueryParserCQLIndex():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserEmptySearchString():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserSimpleQuery():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserWithAsteriskAtBeginning():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserWithBooleanOperators():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserWithEscapeCharacters():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserWithIllegalLogicalOperators():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserWithLogicalOperators():void
Sequential
Tags: annotations=@Test
throws=Exception
Notes: TODO Single Quotes at the end or in the middle of a word are currently accepted by the parser, but shouldn't be. Parser has to be changed
@Test public void testQueryParserWithClosingQuote() throws Exception { Reader sr = new StringReader("test suche\"");; QueryParser qp = new QueryParser(sr); try { String cqlQuery = qp.parse(); logger.info(cqlQuery); fail("ParseException expected"); } catch (ParseException e) { } }
@Test public void testQueryParserWithMiddleQuote() throws Exception { Reader sr = new StringReader("test su\"che");; QueryParser qp = new QueryParser(sr); try { String cqlQuery = qp.parse(); logger.info(cqlQuery); fail("ParseException expected"); } catch (ParseException e) { } }
public
testQueryParserWithOpeningQuote():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserWithQuestionMarkAtBeginning():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserWithQuotes():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserWithSingleAsterisk():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserWithSingleQuestionmark():void
Sequential
Tags: annotations=@Test
throws=Exception
public
testQueryParserWithSpecialCharacters():void
Sequential
Tags: annotations=@Test
throws=Exception