KotlinSnippetExecutor extends AbstractSnippetExecutor<KotlinSnippetExecutorOptions> { protected boolean hasPackage(final CodeSnippet codeSnippet) { final String packageName = codeSnippet.getProperties().get(PACKAGE_NAME_PROPERTY); return packageName != null && !packageName.isEmpty(); } KotlinSnippetExecutor(); @Override Parent getUI(final CodeSnippet codeSnippet); @Override Node getConfigurationUI(); @Override void saveNewOptions(); @Override ObservableList<String> execute(final CodeSnippet codeSnippet);  }
@Test public void hasNoPackage() { final CodeSnippet snippet = new CodeSnippet(); assertFalse(snippetExecutor.hasPackage(snippet)); }
@Test public void hasEmptyPackage() { final CodeSnippet snippet = new CodeSnippet(); snippet.getProperties().put(PACKAGE_NAME_PROPERTY, ""); assertFalse(snippetExecutor.hasPackage(snippet)); }
@Test public void hasPackage() { final CodeSnippet snippet = new CodeSnippet(); snippet.getProperties().put(PACKAGE_NAME_PROPERTY, "SlideshowFX"); assertTrue(snippetExecutor.hasPackage(snippet)); }