aboutsummaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
authorMartín Schonaker <[email protected]>2014-04-10 01:17:01 -0300
committerMartín Schonaker <[email protected]>2014-04-10 01:17:01 -0300
commit4b869a60b026b4c6822c42c7656993d0c265ef50 (patch)
tree9f5f5939a7a2e4d391dd5a2bb8b67fbfba54970d /api
parent2ef19b55ae6913a289df68c3756a990f376354aa (diff)
Issue #25: some tests at DeltaTest.
Diffstat (limited to 'api')
-rwxr-xr-xapi/src/test/java/org/semver/DeltaTest.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/api/src/test/java/org/semver/DeltaTest.java b/api/src/test/java/org/semver/DeltaTest.java
index 3c36d42..3562592 100755
--- a/api/src/test/java/org/semver/DeltaTest.java
+++ b/api/src/test/java/org/semver/DeltaTest.java
@@ -21,7 +21,9 @@ import java.util.Set;
import org.junit.Assert;
import org.junit.Test;
+import org.osjava.jardiff.ClassInfo;
import org.osjava.jardiff.FieldInfo;
+import org.osjava.jardiff.MethodInfo;
public class DeltaTest {
@@ -142,4 +144,18 @@ public class DeltaTest {
Assert.assertFalse(new Delta(Collections.singleton(new Delta.Remove("class", new FieldInfo(0, "", "", "", null)))).validate(new Version(1, 1, 0), new Version(1, 1, 1)));
}
+ @Test
+ public void upgradeMinorVersionOnClassDeprecated() {
+ Assert.assertTrue(new Delta(Collections.singleton(new Delta.Deprecate("class", new ClassInfo(1, 0, "", "", "", null, null, null), new ClassInfo(1, 0, "", "", "", null, null, null)))).validate(new Version(1, 1, 0), new Version(1, 2, 0)));
+ }
+
+ @Test
+ public void upgradeMinorVersionOnFieldDeprecated() {
+ Assert.assertTrue(new Delta(Collections.singleton(new Delta.Deprecate("class", new FieldInfo(0, "", "", "", null), new FieldInfo(0, "", "", "", null)))).validate(new Version(1, 1, 0), new Version(1, 2, 0)));
+ }
+
+ @Test
+ public void upgradeMinorVersionOnMethodDeprecated() {
+ Assert.assertTrue(new Delta(Collections.singleton(new Delta.Deprecate("class", new MethodInfo(0, "", "", "", null), new MethodInfo(0, "", "", "", null)))).validate(new Version(1, 1, 0), new Version(1, 2, 0)));
+ }
} \ No newline at end of file