@Test public void whenCreatingCustomJavaPluginThenRetrieveRightNumberOfExtensions() { CustomPlugin javaPlugin = new CustomPlugin(); Plugin.Context context = new Plugin.Context(SonarQubeVersion.V5_6); javaPlugin.define(context); assertThat(context.getExtensions().size(), is(3)); }
@Override public void define(Context context) { ImmutableList.Builder<Object> builder = ImmutableList.builder(); builder.add( CustomRulesDefinition.class, CustomRulesCheckRegistrar.class, CustomProfile.class); context.addExtensions(builder.build()); }
CustomPlugin implements Plugin { @Override public void define(Context context) { ImmutableList.Builder<Object> builder = ImmutableList.builder(); builder.add( CustomRulesDefinition.class, CustomRulesCheckRegistrar.class, CustomProfile.class); context.addExtensions(builder.build()); } }
CustomPlugin implements Plugin { @Override public void define(Context context) { ImmutableList.Builder<Object> builder = ImmutableList.builder(); builder.add( CustomRulesDefinition.class, CustomRulesCheckRegistrar.class, CustomProfile.class); context.addExtensions(builder.build()); }  }
CustomPlugin implements Plugin { @Override public void define(Context context) { ImmutableList.Builder<Object> builder = ImmutableList.builder(); builder.add( CustomRulesDefinition.class, CustomRulesCheckRegistrar.class, CustomProfile.class); context.addExtensions(builder.build()); }  @Override void define(Context context); }
CustomPlugin implements Plugin { @Override public void define(Context context) { ImmutableList.Builder<Object> builder = ImmutableList.builder(); builder.add( CustomRulesDefinition.class, CustomRulesCheckRegistrar.class, CustomProfile.class); context.addExtensions(builder.build()); }  @Override void define(Context context);  }