public ImportGremlinPlugin create() { if (enumImports.isEmpty() && classImports.isEmpty() && methodImports.isEmpty()) throw new IllegalStateException("At least one import must be specified"); return new ImportGremlinPlugin(this); }
@Test public void shouldReturnNoCustomizers() { final GremlinScriptEngineManager mgr = new DefaultGremlinScriptEngineManager(); mgr.addPlugin(ImportGremlinPlugin.build() .classImports(java.awt.Color.class) .appliesTo(Collections.singletonList("fake-script-engine")).create()); assertEquals(0, mgr.getCustomizers(ENGINE_TO_TEST).size()); }
@Test public void shouldReturnNoCustomizers() { final GremlinScriptEngineManager mgr = new DefaultGremlinScriptEngineManager(); mgr.addPlugin(ImportGremlinPlugin.build() .classImports(java.awt.Color.class) .appliesTo(Collections.singletonList("fake-script-engine")).create()); assertEquals(0, mgr.getCustomizers(ENGINE_TO_TEST).size()); }
public ImportGremlinPlugin create() { if (enumImports.isEmpty() && classImports.isEmpty() && methodImports.isEmpty()) throw new IllegalStateException("At least one import must be specified"); return new ImportGremlinPlugin(this); }