assertThat(file.getMeasureIntValue("violations")).isGreaterThan(0);
}
}
@Test
public void scan_java_sources_and_bytecode() {
<BUG>orchestrator.getServer().restoreProfile(ResourceLocation.create("/requires-bytecode-profile.xml"));
SonarRunner build = newRunner(new File("projects/java-bytecode")).setProfile("requires-bytecode");
orchestrator.executeBuild(build);</BUG>
Resource project = orchestrator.getServer().getWsClient().find(new ResourceQuery("java:bytecode").setMetrics("lcom4", "violations"));
assertThat(project.getName()).isEqualTo("Java Bytecode Sample");

assertThat(file.getMeasureIntValue("violations")).isGreaterThan(0);
}
}
@Test
public void scan_java_sources_and_bytecode() {
orchestrator.getServer().restoreProfile(ResourceLocation.create("/requires-bytecode-profile.xml"));
orchestrator.getServer().provisionProject("java:bytecode", "Java Bytecode Sample");
orchestrator.getServer().associateProjectToQualityProfile("java:bytecode", "java", "requires-bytecode");
SonarRunner build = newRunner(new File("projects/java-bytecode"));
orchestrator.executeBuild(build);
Resource project = orchestrator.getServer().getWsClient().find(new ResourceQuery("java:bytecode").setMetrics("lcom4", "violations"));
assertThat(project.getName()).isEqualTo("Java Bytecode Sample");
