1 package de.example.plugins.custom.java;
3 import static org.hamcrest.CoreMatchers.is;
4 import static org.junit.Assert.assertThat;
7 import org.sonar.api.Plugin;
8 import org.sonar.api.SonarQubeVersion;
10 public class CustomPluginTest {
13 public void whenCreatingCustomJavaPluginThenRetrieveRightNumberOfExtensions() {
14 CustomPlugin javaPlugin = new CustomPlugin();
15 Plugin.Context context = new Plugin.Context(SonarQubeVersion.V5_6);
17 javaPlugin.define(context);
19 assertThat(context.getExtensions().size(), is(3));