aboutsummaryrefslogtreecommitdiffstats
path: root/api/src/test/java/org/semver/VersionTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'api/src/test/java/org/semver/VersionTest.java')
-rwxr-xr-xapi/src/test/java/org/semver/VersionTest.java15
1 files changed, 15 insertions, 0 deletions
diff --git a/api/src/test/java/org/semver/VersionTest.java b/api/src/test/java/org/semver/VersionTest.java
index 9ba6e2d..a7aa0e4 100755
--- a/api/src/test/java/org/semver/VersionTest.java
+++ b/api/src/test/java/org/semver/VersionTest.java
@@ -72,6 +72,21 @@ public class VersionTest {
}
@Test
+ public void shouldMajorBeCorrectlyIncremented() {
+ Assert.assertEquals(Version.parse("10.0.0"), Version.parse("9.0.0").next(Version.Element.MAJOR));
+ }
+
+ @Test
+ public void shouldMinorBeCorrectlyIncremented() {
+ Assert.assertEquals(Version.parse("0.10.0"), Version.parse("0.9.0").next(Version.Element.MINOR));
+ }
+
+ @Test
+ public void shouldPatchBeCorrectlyIncremented() {
+ Assert.assertEquals(Version.parse("0.0.10"), Version.parse("0.0.9").next(Version.Element.PATCH));
+ }
+
+ @Test
public void shouldDevelopmentBeInDevelopment() {
Assert.assertTrue(Version.parse("0.1.1").isInDevelopment());
Assert.assertFalse(Version.parse("1.1.1").isInDevelopment());