aboutsummaryrefslogtreecommitdiffstats
path: root/api/src/test/java/org/semver/VersionTest.java
diff options
context:
space:
mode:
authorJulien Eluard <[email protected]>2010-11-19 09:57:35 +0100
committerJulien Eluard <[email protected]>2010-11-19 09:57:35 +0100
commitae801320aa1ff89ebdec45559657db5f5841ba11 (patch)
tree8911755cb7269b6f705554910d00f7d3ab5a4f27 /api/src/test/java/org/semver/VersionTest.java
parent95a44b57760f4a9e656a5bf68421a66095306e97 (diff)
API refactoring.
Diffstat (limited to 'api/src/test/java/org/semver/VersionTest.java')
-rw-r--r--api/src/test/java/org/semver/VersionTest.java20
1 files changed, 6 insertions, 14 deletions
diff --git a/api/src/test/java/org/semver/VersionTest.java b/api/src/test/java/org/semver/VersionTest.java
index 4197f8a..73f3b76 100644
--- a/api/src/test/java/org/semver/VersionTest.java
+++ b/api/src/test/java/org/semver/VersionTest.java
@@ -43,7 +43,7 @@ public class VersionTest {
}
@Test
- public void shouldValidVersionAreParsed() {
+ public void shouldValidVersionBeParsed() {
Version.parse("1.2.3");
Version.parse("1.2.3beta");
}
@@ -63,6 +63,11 @@ public class VersionTest {
Version.parse("1.2.3.beta");
}
+ @Test(expected=IllegalArgumentException.class)
+ public void shouldInvalidVersion4NotBeParsed() {
+ Version.parse("1.2");
+ }
+
@Test
public void shouldDevelopmentBeInDevelopment() {
Assert.assertTrue(Version.parse("0.1.1").isInDevelopment());
@@ -85,17 +90,4 @@ public class VersionTest {
Assert.assertFalse(Version.parse("0.0.0").compareTo(Version.parse("0.0.1")) < 0);
}
- @Test
- public void isAtLeast() {
- Assert.assertTrue(Version.Type.MAJOR.isAtLeast(Version.Type.MAJOR));
- Assert.assertTrue(Version.Type.MAJOR.isAtLeast(Version.Type.MINOR));
- Assert.assertTrue(Version.Type.MAJOR.isAtLeast(Version.Type.PATCH));
- Assert.assertFalse(Version.Type.MINOR.isAtLeast(Version.Type.MAJOR));
- Assert.assertTrue(Version.Type.MINOR.isAtLeast(Version.Type.MINOR));
- Assert.assertTrue(Version.Type.MINOR.isAtLeast(Version.Type.PATCH));
- Assert.assertFalse(Version.Type.PATCH.isAtLeast(Version.Type.MAJOR));
- Assert.assertFalse(Version.Type.PATCH.isAtLeast(Version.Type.MINOR));
- Assert.assertTrue(Version.Type.PATCH.isAtLeast(Version.Type.PATCH));
- }
-
}