use of org.sonarsource.sonarlint.core.plugin.commons.SkipReason.UnsatisfiedRuntimeRequirement in project sonarlint-core by SonarSource.
the class SkipReasonTests method testUnsatisfiedRuntimeRequirement_getters_equals_hashcode_tostring.
@Test
void testUnsatisfiedRuntimeRequirement_getters_equals_hashcode_tostring() {
var underTest = new UnsatisfiedRuntimeRequirement(RuntimeRequirement.JRE, "1.0", "2.0");
// Getters
assertThat(underTest.getMinVersion()).isEqualTo("2.0");
assertThat(underTest.getCurrentVersion()).isEqualTo("1.0");
assertThat(underTest).isEqualTo(underTest).isNotEqualTo(IncompatiblePluginApi.INSTANCE).isNotEqualTo(new UnsatisfiedRuntimeRequirement(RuntimeRequirement.NODEJS, "1.0", "2.0")).isNotEqualTo(new UnsatisfiedRuntimeRequirement(RuntimeRequirement.JRE, "1.0", "1.0")).isNotEqualTo(new UnsatisfiedRuntimeRequirement(RuntimeRequirement.JRE, "2.0", "1.0")).isEqualTo(new UnsatisfiedRuntimeRequirement(RuntimeRequirement.JRE, "1.0", "2.0")).hasSameHashCodeAs(underTest).hasSameHashCodeAs(new UnsatisfiedRuntimeRequirement(RuntimeRequirement.JRE, "1.0", "2.0")).hasToString("UnsatisfiedRuntimeRequirement [runtime=JRE, currentVersion=1.0, minVersion=2.0]");
}
Aggregations