@Test public void should_create_a_valid_sensor_descriptor() { DefaultSensorDescriptor descriptor = new DefaultSensorDescriptor(); createJSONSquidSensor().describe(descriptor); assertThat(descriptor.name()).isEqualTo("JSON Squid Sensor"); assertThat(descriptor.languages()).containsOnly("json"); assertThat(descriptor.type()).isEqualTo(InputFile.Type.MAIN); }
@Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(JSONLanguage.KEY) .name("JSON Squid Sensor") .onlyOnFileType(Type.MAIN); }
JSONSquidSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(JSONLanguage.KEY) .name("JSON Squid Sensor") .onlyOnFileType(Type.MAIN); } }
JSONSquidSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(JSONLanguage.KEY) .name("JSON Squid Sensor") .onlyOnFileType(Type.MAIN); } JSONSquidSensor(FileSystem fileSystem, CheckFactory checkFactory);  JSONSquidSensor(FileSystem fileSystem, CheckFactory checkFactory, @Nullable CustomJSONRulesDefinition[] customRulesDefinition); }
JSONSquidSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(JSONLanguage.KEY) .name("JSON Squid Sensor") .onlyOnFileType(Type.MAIN); } JSONSquidSensor(FileSystem fileSystem, CheckFactory checkFactory);  JSONSquidSensor(FileSystem fileSystem, CheckFactory checkFactory, @Nullable CustomJSONRulesDefinition[] customRulesDefinition); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext sensorContext); }
JSONSquidSensor implements Sensor { @Override public void describe(SensorDescriptor descriptor) { descriptor .onlyOnLanguage(JSONLanguage.KEY) .name("JSON Squid Sensor") .onlyOnFileType(Type.MAIN); } JSONSquidSensor(FileSystem fileSystem, CheckFactory checkFactory);  JSONSquidSensor(FileSystem fileSystem, CheckFactory checkFactory, @Nullable CustomJSONRulesDefinition[] customRulesDefinition); @Override void describe(SensorDescriptor descriptor); @Override void execute(SensorContext sensorContext);  }