mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-11 01:33:24 +01:00
add test for version comparison
This commit is contained in:
parent
b0a6e7fac5
commit
c83f4bd213
@ -0,0 +1,27 @@
|
|||||||
|
package com.wisemapping.test.importer;
|
||||||
|
|
||||||
|
import com.wisemapping.importer.ImporterException;
|
||||||
|
import com.wisemapping.importer.VersionNumber;
|
||||||
|
import org.testng.Assert;
|
||||||
|
import org.testng.annotations.Test;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public class VersionComparisonTest {
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testVersionComparison() throws ImporterException {
|
||||||
|
|
||||||
|
final VersionNumber greatest = new VersionNumber("1.0.1");
|
||||||
|
final VersionNumber smaller = new VersionNumber("0.9.0");
|
||||||
|
final VersionNumber intermediate = new VersionNumber("1.0.0");
|
||||||
|
|
||||||
|
Assert.assertTrue(smaller.isSmallerThan(intermediate));
|
||||||
|
Assert.assertFalse(greatest.isSmallerThan(intermediate));
|
||||||
|
Assert.assertTrue(greatest.isGreaterThan(smaller));
|
||||||
|
Assert.assertFalse(intermediate.isGreaterThan(greatest));
|
||||||
|
Assert.assertTrue(intermediate.equals(intermediate));
|
||||||
|
Assert.assertFalse(greatest.equals(smaller));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user