Examples of NumericVersion


Examples of biz.massivedynamics.versioneer.version.impl.NumericVersion

     *
     * @since 1.3.1.0
     */
    @Test
    public void testHalfConstructor() {
        VersionTooLowException exception = new VersionTooLowException(new NumericVersion(15));

        assertEquals("The specified version is too low.", exception.getMessage());

        assertEquals(new NumericVersion(15), exception.getMinimumVersion());
        assertNull(exception.getSuppliedVersion());
    }
View Full Code Here

Examples of biz.massivedynamics.versioneer.version.impl.NumericVersion

     */
    @Test
    public void testFullConstructor() {
        try {

            VersionTooLowException exception = new VersionTooLowException(new NumericVersion(14), new NumericVersion(15));

            assertEquals("The specified version is too low.", exception.getMessage());

            assertEquals(new NumericVersion(14), exception.getMinimumVersion());
            assertEquals(new NumericVersion(15), exception.getSuppliedVersion());

        } catch (VersionTooHighException thrown) {
            fail("Unexpected exception found: " + thrown.toString());
        }

        try {
            //noinspection ThrowableInstanceNeverThrown
            new VersionTooLowException(new NumericVersion(14), new NumericVersion(13));

            fail("Expected failure.");
        } catch (VersionTooHighException thrown) {
            assertEquals(new NumericVersion(13), thrown.getMaximumVersion());
        }


    }
View Full Code Here

Examples of biz.massivedynamics.versioneer.version.impl.NumericVersion

     *
     * @since 1.3.1.0
     */
    @Test
    public void testFullConstruction() {
        UnstableVersionException exception = new UnstableVersionException(new NumericVersion(1));

        assertEquals("The specified version is unstable.", exception.getMessage());

        assertEquals(new NumericVersion(1), exception.getVersion());
    }
View Full Code Here

Examples of biz.massivedynamics.versioneer.version.impl.NumericVersion

     *
     * @since 1.3.1.0
     */
    @Test
    public void testHalfConstructor() {
        VersionTooHighException exception = new VersionTooHighException(new NumericVersion(15));

        assertEquals("The specified version is too high.", exception.getMessage());

        assertEquals(new NumericVersion(15), exception.getMaximumVersion());
        assertNull(exception.getSuppliedVersion());
    }
View Full Code Here

Examples of biz.massivedynamics.versioneer.version.impl.NumericVersion

     */
    @Test
    public void testFullConstructor() {
        try {

            VersionTooHighException exception = new VersionTooHighException(new NumericVersion(15), new NumericVersion(14));

            assertEquals("The specified version is too high.", exception.getMessage());

            assertEquals(new NumericVersion(15), exception.getMaximumVersion());
            assertEquals(new NumericVersion(14), exception.getSuppliedVersion());

        } catch (VersionTooLowException thrown) {
            fail("Unexpected exception found: " + thrown.toString());
        }

        try {
            //noinspection ThrowableInstanceNeverThrown
            new VersionTooHighException(new NumericVersion(15), new NumericVersion(16));

            fail("Expected failure.");
        } catch (VersionTooLowException thrown) {
            assertEquals(new NumericVersion(16), thrown.getMinimumVersion());
        }


    }
View Full Code Here

Examples of biz.massivedynamics.versioneer.version.impl.NumericVersion

                    _version = Integer.valueOf(versionParts[0].split("[ -]")[0]);
                } else {
                    _version = Integer.valueOf(versionParts[0]);
                }

                version = new NumericVersion(_version);
            }
            break;
        }

        //Check the version before we start on the rest
View Full Code Here

Examples of biz.massivedynamics.versioneer.version.impl.NumericVersion

                    _version = Integer.valueOf(versionParts[0].split("[ -]")[0]);
                } else {
                    _version = Integer.valueOf(versionParts[0]);
                }

                version = new NumericVersion(_version);
            }
            break;
        }

        //Check the version before we start on the rest
View Full Code Here

Examples of de.idos.updates.NumericVersion

    @Then("^the system uses the file on the classpath to configure itself$")
    public void the_system_uses_the_file_on_the_classpath_to_configure_itself() throws Throwable {
      Updater updater = updateSystem.checkForUpdates();
      updater.runCheck();
      Version latestVersion = updater.getLatestVersion();
        assertThat(latestVersion, is(sameVersionAs(new NumericVersion(1, 0, 1))));
    }
View Full Code Here

Examples of de.idos.updates.NumericVersion

    @Then("^the system uses the file in the working directory to configure itself$")
    public void the_system_uses_the_file_in_the_working_directory_to_configure_itself() throws Throwable {
      Updater updater = updateSystem.checkForUpdates();
      updater.runCheck();
      Version latestVersion = updater.getLatestVersion();
        assertThat(latestVersion, is(sameVersionAs(new NumericVersion(1, 0, 2))));
    }
View Full Code Here

Examples of de.idos.updates.NumericVersion

  public void the_repository_contains_a_more_recent_version() throws Throwable {
    File versionsFolder = new File(repositoryFolder, AVAILABLE_VERSIONS);
    File latestVersionFolder = new File(versionsFolder, "4.2.1");
    latestVersionFolder.mkdir();
    new File(latestVersionFolder, "content").createNewFile();
    this.latestVersion = new NumericVersion(4, 2, 1);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.