diff options
author | Andrew Barchuk <raindev@icloud.com> | 2015-12-03 20:23:50 +0200 |
---|---|---|
committer | Andrew Barchuk <raindev@icloud.com> | 2015-12-03 20:23:50 +0200 |
commit | e910d28348488741f1c2a48e0231b29187dc31da (patch) | |
tree | 2bf60108c2e035b3a0215e5ba2fdd80458f96d03 /src | |
parent | f909a84122e29fbf3096821cc69080a202d57fc2 (diff) | |
download | testng-e910d28348488741f1c2a48e0231b29187dc31da.tar.gz |
Add assertions test for mixing boxed/raw arrays
Diffstat (limited to 'src')
-rw-r--r-- | src/test/java/test/asserttests/ArrayEqualityAssertTest.java | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/test/java/test/asserttests/ArrayEqualityAssertTest.java b/src/test/java/test/asserttests/ArrayEqualityAssertTest.java index a649da9d..5eb0e182 100644 --- a/src/test/java/test/asserttests/ArrayEqualityAssertTest.java +++ b/src/test/java/test/asserttests/ArrayEqualityAssertTest.java @@ -34,13 +34,25 @@ public class ArrayEqualityAssertTest { @Test
public void boxedArrayAssertEquals() {
- assertEquals(new Integer[]{ 42 }, new int[] { 42 },
+ assertEquals(new Integer[]{ 42 }, new Integer[] { 42 },
"arrays of wrapped values are compared by value in assertEquals");
}
@Test(expectedExceptions = AssertionError.class)
public void boxedArrayAssertNotEquals() {
- assertNotEquals(new Integer[]{ 42 }, new int[] { 42 },
+ assertNotEquals(new Integer[]{ 42 }, new Integer[] { 42 },
+ "arrays of wrapped values are compared by value in assertNotEquals");
+ }
+
+ @Test
+ public void mixedArraysAssertEquals() {
+ assertEquals(new int[]{ 42 }, new Integer[] { 42 },
+ "arrays of wrapped values are compared by value in assertEquals");
+ }
+
+ @Test(expectedExceptions = AssertionError.class)
+ public void mixedArraysAssertNotEquals() {
+ assertNotEquals(new int[]{ 42 }, new Integer[] { 42 },
"arrays of wrapped values are compared by value in assertNotEquals");
}
|