@Test public void testInvalidVersions() { Whitebox.setInternalState(underTest, "latestSupportedRuntime", "7.1.0"); Assert.assertFalse(underTest.isSupported("blah")); Assert.assertFalse(underTest.isSupported("7")); Assert.assertFalse(underTest.isSupported("8")); }
public boolean isSupported(String runtime) { boolean ret; if (Strings.isNullOrEmpty(latestSupportedRuntime)) { ret = true; } else { ret = versionComparator.compare(() -> runtime, () -> latestSupportedRuntime) <= 0; } return ret; }
SupportedRuntimes { public boolean isSupported(String runtime) { boolean ret; if (Strings.isNullOrEmpty(latestSupportedRuntime)) { ret = true; } else { ret = versionComparator.compare(() -> runtime, () -> latestSupportedRuntime) <= 0; } return ret; } }
SupportedRuntimes { public boolean isSupported(String runtime) { boolean ret; if (Strings.isNullOrEmpty(latestSupportedRuntime)) { ret = true; } else { ret = versionComparator.compare(() -> runtime, () -> latestSupportedRuntime) <= 0; } return ret; }  }
SupportedRuntimes { public boolean isSupported(String runtime) { boolean ret; if (Strings.isNullOrEmpty(latestSupportedRuntime)) { ret = true; } else { ret = versionComparator.compare(() -> runtime, () -> latestSupportedRuntime) <= 0; } return ret; }  boolean isSupported(String runtime); }
SupportedRuntimes { public boolean isSupported(String runtime) { boolean ret; if (Strings.isNullOrEmpty(latestSupportedRuntime)) { ret = true; } else { ret = versionComparator.compare(() -> runtime, () -> latestSupportedRuntime) <= 0; } return ret; }  boolean isSupported(String runtime);  }