use of org.sonar.plugins.java.api.JavaVersion in project sonar-java by SonarSource.
the class JavaVersionImplTest method java_8.
@Test
public void java_8() throws Exception {
JavaVersion version = new JavaVersionImpl(8);
assertThat(version.isJava7Compatible()).isTrue();
assertThat(version.isJava8Compatible()).isTrue();
assertThat(version.asInt()).isEqualTo(8);
}
use of org.sonar.plugins.java.api.JavaVersion in project sonar-java by SonarSource.
the class JavaVersionImplTest method java_6.
@Test
public void java_6() throws Exception {
JavaVersion version = new JavaVersionImpl(6);
assertThat(version.isJava7Compatible()).isFalse();
assertThat(version.isJava8Compatible()).isFalse();
assertThat(version.asInt()).isEqualTo(6);
}
use of org.sonar.plugins.java.api.JavaVersion in project sonar-java by SonarSource.
the class JavaVersionImplTest method java_7.
@Test
public void java_7() throws Exception {
JavaVersion version = new JavaVersionImpl(7);
assertThat(version.isJava7Compatible()).isTrue();
assertThat(version.isJava8Compatible()).isFalse();
assertThat(version.asInt()).isEqualTo(7);
}
Aggregations