Ejemplo n.º 1
0
 @Override
 protected void bindSchemas() {
   super.bindSchemas();
   SchemaInfo schemaInfo = mock(SchemaInfo.class);
   when(schemaInfo.getTableInfo(TEST_DOC_TABLE_IDENT.name())).thenReturn(userTableInfo);
   when(schemaInfo.getTableInfo(TEST_PARTITIONED_TABLE_IDENT.name()))
       .thenReturn(TEST_PARTITIONED_TABLE_INFO);
   schemaBinder.addBinding(ReferenceInfos.DEFAULT_SCHEMA_NAME).toInstance(schemaInfo);
 }
 @Override
 protected void configure() {
   FulltextAnalyzerResolver fulltextAnalyzerResolver = mock(FulltextAnalyzerResolver.class);
   when(fulltextAnalyzerResolver.hasCustomAnalyzer("german")).thenReturn(false);
   when(fulltextAnalyzerResolver.hasCustomAnalyzer("ft_search")).thenReturn(true);
   ImmutableSettings.Builder settingsBuilder = ImmutableSettings.builder();
   settingsBuilder.put("search", "foobar");
   when(fulltextAnalyzerResolver.resolveFullCustomAnalyzerSettings("ft_search"))
       .thenReturn(settingsBuilder.build());
   bind(FulltextAnalyzerResolver.class).toInstance(fulltextAnalyzerResolver);
   super.configure();
 }
 @Override
 protected void bindSchemas() {
   super.bindSchemas();
   SchemaInfo schemaInfo = mock(SchemaInfo.class);
   when(schemaInfo.getTableInfo(TEST_DOC_TABLE_IDENT.name())).thenReturn(userTableInfo);
   when(schemaInfo.getTableInfo(TEST_DOC_TABLE_REFRESH_INTERVAL_BY_ONLY.name()))
       .thenReturn(userTableInfoRefreshIntervalByOnly);
   when(schemaInfo.getTableInfo(TEST_PARTITIONED_TABLE_IDENT.name()))
       .thenReturn(TEST_PARTITIONED_TABLE_INFO);
   when(schemaInfo.getTableInfo(TEST_MULTIPLE_PARTITIONED_TABLE_IDENT.name()))
       .thenReturn(TEST_MULTIPLE_PARTITIONED_TABLE_INFO);
   schemaBinder.addBinding(Schemas.DEFAULT_SCHEMA_NAME).toInstance(schemaInfo);
 }
Ejemplo n.º 4
0
 @Override
 protected void bindSchemas() {
   super.bindSchemas();
   SchemaInfo schemaInfo = mock(SchemaInfo.class);
   when(schemaInfo.getTableInfo(USER_TABLE_IDENT.name())).thenReturn(USER_TABLE_INFO);
   when(schemaInfo.getTableInfo(TEST_ALIAS_TABLE_IDENT.name()))
       .thenReturn(TEST_ALIAS_TABLE_INFO);
   when(schemaInfo.getTableInfo(USER_TABLE_IDENT_CLUSTERED_BY_ONLY.name()))
       .thenReturn(USER_TABLE_INFO_CLUSTERED_BY_ONLY);
   when(schemaInfo.getTableInfo(TEST_PARTITIONED_TABLE_IDENT.name()))
       .thenReturn(TEST_PARTITIONED_TABLE_INFO);
   when(schemaInfo.getTableInfo(DEEPLY_NESTED_TABLE_IDENT.name()))
       .thenReturn(DEEPLY_NESTED_TABLE_INFO);
   when(schemaInfo.getTableInfo(NESTED_CLUSTERED_BY_TABLE_IDENT.name()))
       .thenReturn(NESTED_CLUSTERED_BY_TABLE_INFO);
   schemaBinder.addBinding(Schemas.DEFAULT_SCHEMA_NAME).toInstance(schemaInfo);
 }
Ejemplo n.º 5
0
 @Override
 protected void bindFunctions() {
   super.bindFunctions();
   functionBinder.addBinding(ABS_FUNCTION_INFO.ident()).to(AbsFunction.class);
   functionBinder.addBinding(ADD_FUNCTION_INFO.ident()).to(AddTestFunction.class);
 }