@Test public void should_create_a_valid_sensor_descriptor() { DefaultSensorDescriptor descriptor = new DefaultSensorDescriptor(); createGherkinSquidSensor().describe(descriptor); assertThat(descriptor.name()).isEqualTo("Gherkin Squid Sensor"); assertThat(descriptor.languages()).containsOnly("gherkin"); assertThat(descriptor.type()).isEqualTo(InputFile.Type.MAIN); }
@Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(GherkinLanguage.KEY) .name("Gherkin Squid Sensor") .onlyOnFileType(Type.MAIN); }
GherkinSquidSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(GherkinLanguage.KEY) .name("Gherkin Squid Sensor") .onlyOnFileType(Type.MAIN); } }
GherkinSquidSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(GherkinLanguage.KEY) .name("Gherkin Squid Sensor") .onlyOnFileType(Type.MAIN); } GherkinSquidSensor(FileSystem fileSystem, CheckFactory checkFactory);  GherkinSquidSensor(FileSystem fileSystem, CheckFactory checkFactory, @Nullable CustomGherkinRulesDefinition[] customRulesDefinition); }
GherkinSquidSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(GherkinLanguage.KEY) .name("Gherkin Squid Sensor") .onlyOnFileType(Type.MAIN); } GherkinSquidSensor(FileSystem fileSystem, CheckFactory checkFactory);  GherkinSquidSensor(FileSystem fileSystem, CheckFactory checkFactory, @Nullable CustomGherkinRulesDefinition[] customRulesDefinition); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext sensorContext); }
GherkinSquidSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(GherkinLanguage.KEY) .name("Gherkin Squid Sensor") .onlyOnFileType(Type.MAIN); } GherkinSquidSensor(FileSystem fileSystem, CheckFactory checkFactory);  GherkinSquidSensor(FileSystem fileSystem, CheckFactory checkFactory, @Nullable CustomGherkinRulesDefinition[] customRulesDefinition); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext sensorContext);  }