Search in sources :

Example 1 with EdgeBox

use of org.corpus_tools.annis.gui.flatquerybuilder.EdgeBox in project ANNIS by korpling.

the class FlatQueryBuilderTest method addInvalidEdgeOperator.

@Test
void addInvalidEdgeOperator() {
    initQueryBuilder(0);
    // Add a two tokens
    queryBuilder.addLinguisticSequenceBox("tok");
    queryBuilder.addLinguisticSequenceBox("tok");
    // This should have generated and edge box between them
    EdgeBox box = _get(EdgeBox.class);
    // Set to valid and known operator
    box.setValue(".");
    assertEquals(".", box.getValue());
    // Set to invalid, the operator should be set to null
    box.setValue("&SF");
    assertNull(box.getValue());
    // Add a valid, but unknown operator
    box.setValue(".30");
    assertEquals(".30", box.getValue());
}
Also used : EdgeBox(org.corpus_tools.annis.gui.flatquerybuilder.EdgeBox) Test(org.junit.jupiter.api.Test) SpringBootTest(org.springframework.boot.test.context.SpringBootTest)

Aggregations

EdgeBox (org.corpus_tools.annis.gui.flatquerybuilder.EdgeBox)1 Test (org.junit.jupiter.api.Test)1 SpringBootTest (org.springframework.boot.test.context.SpringBootTest)1