mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-21 21:57:56 +01:00
add test for version comparison
This commit is contained in:
parent
68b8428439
commit
cb80d5e976
@ -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