public class DefaultSensorDescriptorTest {
@Test
public void describe() {
DefaultSensorDescriptor descriptor = new DefaultSensorDescriptor();
descriptor
.name("Foo")
.dependsOn(CoreMetrics.NCLOC)
.provides(CoreMetrics.BLOCKER_VIOLATIONS)
.workOnLanguages("java", "php")
.workOnFileTypes(InputFile.Type.MAIN);
assertThat(descriptor.name()).isEqualTo("Foo");
assertThat(descriptor.dependsOn()).containsOnly(CoreMetrics.NCLOC);
assertThat(descriptor.provides()).containsOnly(CoreMetrics.BLOCKER_VIOLATIONS);
assertThat(descriptor.languages()).containsOnly("java", "php");
assertThat(descriptor.types()).containsOnly(InputFile.Type.MAIN);
}