VersionInfo { public String getVersion() { return version; } VersionInfo(Class<?> classInJar, String groupId, String artifactId, String gitPropertiesResource); String getVersion(); String getDate(); String getUser(); String getRevision(); String getBuildVersion(); static int compare(String str1, String str2); static boolean isCompatible(String thisVersion, String requiredVersion); @SuppressWarnings("UseOfSystemOutOrSystemErr") static void main(String[] args); static final VersionInfo APEX_VERSION; }
@Test public void testMavenProperties() { VersionInfo v = new VersionInfo(Operator.class, "org.apache.apex", "apex-api", "git-properties-unavailable"); if (!v.getVersion().matches("[0-9]+.[0-9]+.[0-9]+.*")) { Assert.fail("Version number pattern does not match: " + v.getVersion()); } }