@Test public void testSimpleEnums() { final SuggestionCompletionEngine sce = new SuggestionCompletionEngine(); sce.setDataEnumLists( new HashMap<String, String[]>() ); sce.putDataEnumList( "Fact.type", new String[]{"sex", "colour"} ); assertEquals( 2, sce.getEnumValues( "Fact", "type" ).length ); assertEquals( "sex", sce.getEnumValues( "Fact", "type" )[0] ); assertEquals( "colour", sce.getEnumValues( "Fact", "type" )[1] ); }
@Test public void testSmartEnumsDependingOfSeveralFieldsTwo() { final SuggestionCompletionEngine sce = new SuggestionCompletionEngine(); sce.setDataEnumLists( new HashMap<String, String[]>() ); sce.putDataEnumList( "Fact.field1", new String[]{"a1", "a2"} );
@Test public void testSmarterLookupEnums() { final SuggestionCompletionEngine sce = new SuggestionCompletionEngine(); sce.setDataEnumLists( new HashMap<String, String[]>() ); sce.putDataEnumList( "Fact.type", new String[]{"sex", "colour"} );
@Test public void testSmarterLookupEnumsDifferentOrder() { final SuggestionCompletionEngine sce = new SuggestionCompletionEngine(); sce.setDataEnumLists( new HashMap<String, String[]>() ); sce.putDataEnumList( "Fact.type", new String[]{"sex", "colour"} );
@Test public void testSmartEnumsDependingOfSeveralFieldsFive() { final SuggestionCompletionEngine sce = new SuggestionCompletionEngine(); sce.setDataEnumLists( new HashMap<String, String[]>() ); sce.putDataEnumList( "Fact.field1", new String[]{"a1", "a2"} );
@Test public void testSmartEnums() { final SuggestionCompletionEngine sce = new SuggestionCompletionEngine(); sce.setDataEnumLists( new HashMap<String, String[]>() ); sce.putDataEnumList( "Fact.type", new String[]{"sex", "colour"} );