Java Examples for org.junit.internal.ArrayComparisonFailure
The following java examples will help you to understand the usage of org.junit.internal.ArrayComparisonFailure. These source code samples are taken from different open source projects.
Example 1
| Project: qJava-master File: TestQWriter.java View source code |
protected void serializeObject(final Object referenceObject, final QExpressions qe, final String expr) throws IOException, QException, ArrayComparisonFailure {
final ByteArrayOutputStream stream = new ByteArrayOutputStream();
final QWriter writer = new DefaultQWriter();
writer.setStream(stream);
writer.setEncoding("ISO-8859-1");
writer.write(referenceObject, QConnection.MessageType.SYNC);
final byte[] out = stream.toByteArray();
assertArrayEquals("Serialization failed for q expression: " + expr, qe.getBinaryExpression(expr), copyOfRange(out, 8, out.length));
}Example 2
| Project: eurekastreams-master File: CreateCryptoKeyMapperTest.java View source code |
/**
* Tests.
*/
@Test(expected = ArrayComparisonFailure.class)
public void testExecute() {
byte[] result1 = sut.execute(null);
assertNotNull(result1);
assertTrue(result1.length > 0);
byte[] result2 = sut.execute(null);
assertNotNull(result2);
assertTrue(result2.length > 0);
// The keys SHOULD be different, but there isn't an Assert.assertArrayNotEquals, so I coded for the reverse...
// Thus I expect this line to throw an exception
Assert.assertArrayEquals(result1, result2);
// If it didn't, then throw an exception because two subsequent keys matched
fail("Keys should be different on subsequent calls");
}Example 3
| Project: junit-master File: ArrayComparisonFailureTest.java View source code |
private void assertFailureSerializableFromOthers(String failureFileName) throws IOException, ClassNotFoundException {
try {
assertArrayEquals(new int[] { 0, 1 }, new int[] { 0, 5 });
fail();
} catch (ArrayComparisonFailure e) {
ArrayComparisonFailure arrayComparisonFailureFromFile = deserializeFailureFromFile(failureFileName);
assertNotNull("ArrayComparisonFailure.getCause() should fallback to the deprecated fCause field" + " for compatibility with older versions of junit4 that didn't use Throwable.initCause().", arrayComparisonFailureFromFile.getCause());
assertEquals(e.getCause().toString(), arrayComparisonFailureFromFile.getCause().toString());
assertEquals(e.toString(), arrayComparisonFailureFromFile.toString());
}
}Example 4
| Project: junit4-master File: ArrayComparisonFailureTest.java View source code |
private void assertFailureSerializableFromOthers(String failureFileName) throws IOException, ClassNotFoundException {
try {
assertArrayEquals(new int[] { 0, 1 }, new int[] { 0, 5 });
fail();
} catch (ArrayComparisonFailure e) {
ArrayComparisonFailure arrayComparisonFailureFromFile = deserializeFailureFromFile(failureFileName);
assertNotNull("ArrayComparisonFailure.getCause() should fallback to the deprecated fCause field" + " for compatibility with older versions of junit4 that didn't use Throwable.initCause().", arrayComparisonFailureFromFile.getCause());
assertEquals(e.getCause().toString(), arrayComparisonFailureFromFile.getCause().toString());
assertEquals(e.toString(), arrayComparisonFailureFromFile.toString());
}
}Example 5
| Project: stratosphere-OLD-REPO-master File: TestPlanTest.java View source code |
/**
* Tests if a {@link TestPlan} without explicit data sources and sinks can be executed.
*/
@Test
public void adhocInputAndOutputShouldTransparentlyWork() {
final MapContract map = MapContract.builder(IdentityMap.class).name("Map").build();
TestPlan testPlan = new TestPlan(map);
testPlan.getInput().add(new PactInteger(1), new PactString("test1")).add(new PactInteger(2), new PactString("test2"));
testPlan.run();
testPlan.getInput().setSchema(IntStringPair);
testPlan.getActualOutput().setSchema(IntStringPair);
assertEquals("input and output should be equal in identity map", testPlan.getInput(), testPlan.getActualOutput());
// explicitly check output
Iterator<PactRecord> outputIterator = testPlan.getActualOutput().iterator();
Iterator<PactRecord> inputIterator = testPlan.getInput().iterator();
for (int index = 0; index < 2; index++) {
assertTrue("too few actual output values", outputIterator.hasNext());
assertTrue("too few input values", outputIterator.hasNext());
try {
assertTrue(PactRecordEqualer.recordsEqual(inputIterator.next(), outputIterator.next(), IntStringPair));
} catch (AssertionFailedError e) {
throw new ArrayComparisonFailure("Could not verify output values", e, index);
}
}
assertFalse("too few actual output values", outputIterator.hasNext());
assertFalse("too few input values", outputIterator.hasNext());
}Example 6
| Project: idea-multimarkdown-master File: TestUtils.java View source code |
@Override
protected boolean elementsAreEqual(Suggestion o1, Suggestion o2) {
if (!o1.getText().equals(o2.getText()))
return false;
try {
new UnorderedSuggestionParamComparison().arrayEquals("Suggestion.params not equal", o1.paramsArray(), o2.paramsArray());
} catch (ArrayComparisonFailure ignored) {
return false;
}
return true;
}Example 7
| Project: jboss-vfs-master File: VFSUtilsTestCase.java View source code |
private void assertChildren(VirtualFile original, VirtualFile target) throws ArrayComparisonFailure, IOException {
assertEquals("Original and target must have the same numer of children", original.getChildren().size(), target.getChildren().size());
for (VirtualFile child : original.getChildren()) {
VirtualFile targetChild = target.getChild(child.getName());
assertTrue("Target should contain same children as original", targetChild.exists());
if (child.isDirectory()) {
assertChildren(child, targetChild);
} else {
assertContentEqual(child, targetChild);
}
}
}Example 8
| Project: ogham-master File: AssertAttachment.java View source code |
/** * It ensures that the values of the received attachment are respected by * checking: * <ul> * <li>The mimetype of the attachment</li> * <li>The description of the attachment</li> * <li>The disposition of the attachment</li> * <li>The content of the attachment</li> * </ul> * * @param expected * the expected attachment values * @param attachment * the received attachment * @throws IOException * when email can't be read * @throws MessagingException * when email values can't be accessed * @throws ArrayComparisonFailure * when there are unexpected differences */ public static void assertEquals(ExpectedAttachment expected, BodyPart attachment) throws MessagingException, ArrayComparisonFailure, IOException { Assert.assertTrue("attachment " + expected.getName() + " should have mimetype " + expected.getMimetype() + " but was " + attachment.getContentType(), expected.getMimetype().matcher(attachment.getContentType()).matches()); Assert.assertEquals("attachment " + expected.getName() + " should have description " + expected.getDescription(), expected.getDescription(), attachment.getDescription()); Assert.assertEquals("attachment " + expected.getName() + " should have disposition " + expected.getDisposition(), expected.getDisposition(), attachment.getDisposition()); Assert.assertArrayEquals("attachment " + expected.getName() + " has invalid content", expected.getContent(), getContent(attachment)); }
Example 9
| Project: pg-inet-maven-master File: IPTargetTest.java View source code |
protected void assertIPTarget(IPTarget ip, InetAddress inet, int netmask, byte[] bytes, String str, byte[] mac, InetAddress unimc) throws UnknownHostException, ArrayComparisonFailure {
Assert.assertEquals("Unexpected IPTarget host", inet, ip.getHost());
Assert.assertEquals("Unexpected IPTarget netmask", netmask, ip.getNetmask());
Assert.assertArrayEquals("Unexpected IPTarget addr", bytes, ip.getAddr());
if (bytes.length == 16) {
Assert.assertArrayEquals("Unexpected IPTarget MAC address", mac, ip.getMAC());
Assert.assertEquals("Unexpected IPTarget unicast prefix-based multicast address", unimc, ip.getUnicastPrefixMCAddress());
} else {
Assert.assertArrayEquals("Got a MAC address from an IPv4 address", null, ip.getMAC());
Assert.assertEquals("Got a unicast prefix-based multicast address from an IPv4 address", null, ip.getUnicastPrefixMCAddress());
}
}Example 10
| Project: vfs-master File: VFSUtilsTestCase.java View source code |
private void assertChildren(VirtualFile original, VirtualFile target) throws ArrayComparisonFailure, IOException {
assertEquals("Original and target must have the same numer of children", original.getChildren().size(), target.getChildren().size());
for (VirtualFile child : original.getChildren()) {
VirtualFile targetChild = target.getChild(child.getName());
assertTrue("Target should contain same children as original", targetChild.exists());
if (child.isDirectory()) {
assertChildren(child, targetChild);
} else {
assertContentEqual(child, targetChild);
}
}
}Example 11
| Project: aliyun-odps-java-sdk-master File: ArrayRecordTest.java View source code |
public void testGetBytes(ArrayRecord record) throws ArrayComparisonFailure, UnsupportedEncodingException {
// positive case
record.set("col1", "val1");
record.set(1, "val2");
byte[] b1 = record.getBytes(0);
byte[] b2 = record.getBytes(1);
Assert.assertEquals(4, b1.length);
Assert.assertArrayEquals("Byte not equal", b1, "val1".getBytes());
Assert.assertEquals(4, b2.length);
Assert.assertArrayEquals("Byte not equal", b2, "val2".getBytes());
record.set(0, "䏿–‡æµ‹è¯•1");
record.set("col2", "䏿–‡æµ‹è¯•2");
b1 = record.getBytes(0);
b2 = record.getBytes(1);
Assert.assertEquals(13, b1.length);
Assert.assertArrayEquals("Byte not equal", b1, "䏿–‡æµ‹è¯•1".getBytes(STRING_CHARSET));
Assert.assertEquals(13, b2.length);
Assert.assertArrayEquals("Byte not equal", b2, "䏿–‡æµ‹è¯•2".getBytes(STRING_CHARSET));
record.set(0, "");
record.set("col2", null);
b1 = record.getBytes(0);
b2 = record.getBytes(1);
Assert.assertEquals(0, b1.length);
Assert.assertArrayEquals("Byte not equal", b1, "".getBytes());
Assert.assertNull(b2);
}Example 12
| Project: ecommons-coremisc-master File: TreePartitionerTest.java View source code |
protected static void assertTypedRegions(final ITypedRegion[] expected, final ITypedRegion[] actual) {
Assert.assertEquals("partitions.length", expected.length, actual.length);
for (int i = 0; i < expected.length; i++) {
try {
assertTypedRegion(expected[i], actual[i]);
} catch (final AssertionError e) {
throw new ArrayComparisonFailure("partitions ", e, i);
}
}
}Example 13
| Project: mechanize-master File: PageRequest.java View source code |
private void assertHeaders(final HttpRequestBase request) throws ArrayComparisonFailure {
for (Header header : headers) {
org.apache.http.Header[] requestHeaders = request.getHeaders(header.getName());
boolean foundMatch = false;
for (org.apache.http.Header requestHeader : requestHeaders) if (header.getValues().contains(requestHeader.getValue()))
foundMatch = true;
if (!foundMatch)
Assert.fail(String.format("Could not find request header matching: %s", header));
}
if (request instanceof HttpPost) {
HttpPost post = (HttpPost) request;
HttpEntity entity = post.getEntity();
Parameters actualParameters = extractParameters(entity);
String[] expectedNames = parameters.getNames();
String[] actualNames = actualParameters.getNames();
Arrays.sort(expectedNames);
Arrays.sort(actualNames);
Assert.assertArrayEquals("Expected and actual parameters should equal by available parameter names", expectedNames, actualNames);
for (String name : expectedNames) {
String[] expectedValue = parameters.get(name);
String[] actualValue = actualParameters.get(name);
Assert.assertArrayEquals("Expected parameter of next PageRequest '" + uri + "' must match", expectedValue, actualValue);
}
}
}Example 14
| Project: controller-master File: LLDPTest.java View source code |
private static int checkTLV(final byte[] serializedData, final int offset, final byte typeTLVBits, final String typeTLVName, final short lengthTLV, final byte[] valueTLV, final byte... bytesBeforeValue) throws ArrayComparisonFailure {
byte[] concreteTlvAwaited = awaitedBytes(typeTLVBits, lengthTLV, valueTLV, bytesBeforeValue);
int concreteTlvAwaitLength = concreteTlvAwaited.length;
assertArrayEquals("Serialization problem " + typeTLVName, concreteTlvAwaited, ArrayUtils.subarray(serializedData, offset, offset + concreteTlvAwaitLength));
return offset + concreteTlvAwaitLength;
}Example 15
| Project: GDSC-SMLM-master File: SumFilterTest.java View source code |
private void floatCompareBlockSumNxNInternalAndRollingBlockSumNxNInternal(SumFilter filter, int width, int height, int boxSize) throws ArrayComparisonFailure {
rand = new gdsc.core.utils.Random(-30051976);
float[] data1 = floatCreateData(width, height);
float[] data2 = floatClone(data1);
filter.blockSumNxNInternal(data1, width, height, boxSize);
filter.rollingBlockSumNxNInternal(data2, width, height, boxSize);
floatArrayEquals(String.format("Arrays do not match: [%dx%d] @ %d", width, height, boxSize), data1, data2, boxSize);
}Example 16
| Project: stratosphere-sopremo-master File: SopremoTestPlanTest.java View source code |
/**
* Tests if a {@link SopremoTestPlan} without explicit data sources and sinks can be executed.
*/
@Test
public void adhocInputAndOutputShouldTransparentlyWork() {
final SopremoTestPlan testPlan = new SopremoTestPlan(new Identity());
testPlan.getInput(0).addValue("test1").addValue("test2");
testPlan.run();
assertEquals("input and output should be equal in identity map", testPlan.getInput(0), testPlan.getActualOutput(0));
// explicitly check output
final Iterator<IJsonNode> outputIterator = testPlan.getActualOutput(0).iterator();
final Iterator<IJsonNode> inputIterator = testPlan.getInput(0).iterator();
for (int index = 0; index < 2; index++) {
assertTrue("too few actual output values", outputIterator.hasNext());
assertTrue("too few input values", outputIterator.hasNext());
try {
assertEquals(inputIterator.next(), outputIterator.next());
} catch (final AssertionFailedError e) {
throw new ArrayComparisonFailure("Could not verify output values", e, index);
}
}
assertFalse("too few actual output values", outputIterator.hasNext());
assertFalse("too few input values", outputIterator.hasNext());
}Example 17
| Project: syncany-master File: TestAssertUtil.java View source code |
public static void assertFileListEquals(String message, Map<String, File> expectedFiles, Map<String, File> actualFiles) throws ArrayComparisonFailure, Exception {
assertCollectionEquals("Actual file list (" + actualFiles.size() + " entries) differs from expected file list (" + expectedFiles.size() + " entries)", expectedFiles.keySet(), actualFiles.keySet());
for (Map.Entry<String, File> expectedFileEntry : expectedFiles.entrySet()) {
File expectedFile = expectedFileEntry.getValue();
File actualFile = actualFiles.remove(expectedFileEntry.getKey());
assertFileEquals(expectedFile, actualFile);
}
}Example 18
| Project: syncany-plugin-dropbox-master File: TestAssertUtil.java View source code |
public static void assertFileListEquals(String message, Map<String, File> expectedFiles, Map<String, File> actualFiles) throws ArrayComparisonFailure, Exception {
assertCollectionEquals("Actual file list (" + actualFiles.size() + " entries) differs from expected file list (" + expectedFiles.size() + " entries)", expectedFiles.keySet(), actualFiles.keySet());
for (Map.Entry<String, File> expectedFileEntry : expectedFiles.entrySet()) {
File expectedFile = expectedFileEntry.getValue();
File actualFile = actualFiles.remove(expectedFileEntry.getKey());
assertFileEquals(expectedFile, actualFile);
}
}Example 19
| Project: syncany-plugin-flickr-master File: TestAssertUtil.java View source code |
public static void assertFileListEquals(String message, Map<String, File> expectedFiles, Map<String, File> actualFiles) throws ArrayComparisonFailure, Exception {
assertCollectionEquals("Actual file list (" + actualFiles.size() + " entries) differs from expected file list (" + expectedFiles.size() + " entries)", expectedFiles.keySet(), actualFiles.keySet());
for (Map.Entry<String, File> expectedFileEntry : expectedFiles.entrySet()) {
File expectedFile = expectedFileEntry.getValue();
File actualFile = actualFiles.remove(expectedFileEntry.getKey());
assertFileEquals(expectedFile, actualFile);
}
}Example 20
| Project: syncany-plugin-gui-master File: TestAssertUtil.java View source code |
public static void assertFileListEquals(String message, Map<String, File> expectedFiles, Map<String, File> actualFiles) throws ArrayComparisonFailure, Exception {
assertCollectionEquals("Actual file list (" + actualFiles.size() + " entries) differs from expected file list (" + expectedFiles.size() + " entries)", expectedFiles.keySet(), actualFiles.keySet());
for (Map.Entry<String, File> expectedFileEntry : expectedFiles.entrySet()) {
File expectedFile = expectedFileEntry.getValue();
File actualFile = actualFiles.remove(expectedFileEntry.getKey());
assertFileEquals(expectedFile, actualFile);
}
}Example 21
| Project: syncany-plugin-s3-master File: TestAssertUtil.java View source code |
public static void assertFileListEquals(String message, Map<String, File> expectedFiles, Map<String, File> actualFiles) throws ArrayComparisonFailure, Exception {
assertCollectionEquals("Actual file list (" + actualFiles.size() + " entries) differs from expected file list (" + expectedFiles.size() + " entries)", expectedFiles.keySet(), actualFiles.keySet());
for (Map.Entry<String, File> expectedFileEntry : expectedFiles.entrySet()) {
File expectedFile = expectedFileEntry.getValue();
File actualFile = actualFiles.remove(expectedFileEntry.getKey());
assertFileEquals(expectedFile, actualFile);
}
}Example 22
| Project: syncany-plugin-sftp-master File: TestAssertUtil.java View source code |
public static void assertFileListEquals(String message, Map<String, File> expectedFiles, Map<String, File> actualFiles) throws ArrayComparisonFailure, Exception {
assertCollectionEquals("Actual file list (" + actualFiles.size() + " entries) differs from expected file list (" + expectedFiles.size() + " entries)", expectedFiles.keySet(), actualFiles.keySet());
for (Map.Entry<String, File> expectedFileEntry : expectedFiles.entrySet()) {
File expectedFile = expectedFileEntry.getValue();
File actualFile = actualFiles.remove(expectedFileEntry.getKey());
assertFileEquals(expectedFile, actualFile);
}
}Example 23
| Project: OpenSpotLight-master File: Assert.java View source code |
/**
* Asserts that two object arrays are equal. If they are not, an
* {@link AssertionError} is thrown with the given message. If <code>expecteds</code> and
* <code>actuals</code> are <code>null</code>, they are considered equal.
* @param message the identifying message or <code>null</code> for the {@link AssertionError}
* @param expecteds Object array or array of arrays (multi-dimensional array) with expected values.
* @param actuals Object array or array of arrays (multi-dimensional array) with actual values
*/
private static void internalArrayEquals(String message, Object expecteds, Object actuals) throws ArrayComparisonFailure {
if (expecteds == actuals)
return;
String header = message == null ? "" : message + ": ";
if (expecteds == null)
fail(header + "expected array was null");
if (actuals == null)
fail(header + "actual array was null");
int actualsLength = Array.getLength(actuals);
int expectedsLength = Array.getLength(expecteds);
if (actualsLength != expectedsLength)
fail(header + "array lengths differed, expected.length=" + expectedsLength + " actual.length=" + actualsLength);
for (int i = 0; i < expectedsLength; i++) {
Object expected = Array.get(expecteds, i);
Object actual = Array.get(actuals, i);
if (isArray(expected) && isArray(actual)) {
try {
internalArrayEquals(message, expected, actual);
} catch (ArrayComparisonFailure e) {
e.addDimension(i);
throw e;
}
} else
try {
assertEquals(expected, actual);
} catch (AssertionError e) {
throw new ArrayComparisonFailure(header, e, i);
}
}
}Example 24
| Project: PdfBox-Android-master File: Type1FontUtilTest.java View source code |
private void tryHexEncoding(long seed) throws ArrayComparisonFailure {
byte[] bytes = createRandomByteArray(128, seed);
String encodedBytes = Type1FontUtil.hexEncode(bytes);
byte[] decodedBytes = Type1FontUtil.hexDecode(encodedBytes);
assertArrayEquals("Seed: " + seed, bytes, decodedBytes);
}Example 25
| Project: pdfbox-master File: Type1FontUtilTest.java View source code |
private void tryHexEncoding(long seed) throws ArrayComparisonFailure {
byte[] bytes = createRandomByteArray(128, seed);
String encodedBytes = Type1FontUtil.hexEncode(bytes);
byte[] decodedBytes = Type1FontUtil.hexDecode(encodedBytes);
assertArrayEquals("Seed: " + seed, bytes, decodedBytes);
}Example 26
| Project: aries-master File: MainTest.java View source code |
private void assertStreams(InputStream is1, InputStream is2) throws IOException, ArrayComparisonFailure {
try {
byte[] bytes1 = Streams.suck(is1);
byte[] bytes2 = Streams.suck(is2);
Assert.assertArrayEquals("Files not equal", bytes1, bytes2);
} finally {
is1.close();
is2.close();
}
}Example 27
| Project: delight-metrics-master File: TestCounter.java View source code |
private static void assertArrayEquals(final String message, final Object[] expecteds, final Object[] actuals) throws ArrayComparisonFailure {
Assert.assertArrayEquals(message, expecteds, actuals);
}Example 28
| Project: lightweight-java-metrics-master File: TestCounter.java View source code |
private static void assertArrayEquals(final String message, final Object[] expecteds, final Object[] actuals) throws ArrayComparisonFailure {
Assert.assertArrayEquals(message, expecteds, actuals);
}Example 29
| Project: testtools-master File: VertxAssert.java View source code |
public static void assertArrayEquals(String message, char[] expecteds, char[] actuals) throws ArrayComparisonFailure {
try {
Assert.assertArrayEquals(message, expecteds, actuals);
} catch (AssertionError e) {
handleThrowable(e);
}
}Example 30
| Project: giulius-selenium-tests-master File: SeleniumTest.java View source code |
protected void assertArrayEquals(String message, Object[] expecteds, Object[] actuals) throws ArrayComparisonFailure {
try {
org.junit.Assert.assertArrayEquals(message, expecteds, actuals);
} catch (AssertionError err) {
try {
takeScreenShot();
} finally {
throw err;
}
}
}Example 31
| Project: MaritimeCloud-master File: MoreAsserts.java View source code |
public static void assertArrayEquals(Object[] expected, Object[] actual) {
try {
Assert.assertArrayEquals(expected, actual);
} catch (ArrayComparisonFailure e) {
System.err.println("Expected " + Arrays.toString(expected));
System.err.println("Actual " + Arrays.toString(actual));
throw e;
}
}Example 32
| Project: RoboBuggy-master File: AssertionTest.java View source code |
@Test(expected = ArrayComparisonFailure.class)
public void arraysElementsDiffer() {
assertArrayEquals("not equal", (new Object[] { "this is a very long string in the middle of an array" }), (new Object[] { "this is another very long string in the middle of an array" }));
}Example 33
| Project: sosies-generator-master File: AssertionTest.java View source code |
@Test(expected = ArrayComparisonFailure.class)
public void arraysElementsDiffer() {
assertArrayEquals("not equal", (new Object[] { "this is a very long string in the middle of an array" }), (new Object[] { "this is another very long string in the middle of an array" }));
}Example 34
| Project: vert.x-master File: AsyncTestBase.java View source code |
protected void assertArrayEquals(String message, char[] expecteds, char[] actuals) throws ArrayComparisonFailure {
checkThread();
try {
Assert.assertArrayEquals(message, expecteds, actuals);
} catch (AssertionError e) {
handleThrowable(e);
}
}Example 35
| Project: Java-Thread-Affinity-master File: Assert.java View source code |
/**
* Asserts that two object arrays are equal. If they are not, an
* {@link AssertionError} is thrown with the given message. If
* <code>expecteds</code> and <code>actuals</code> are <code>null</code>,
* they are considered equal.
*
* @param message the identifying message for the {@link AssertionError} (<code>null</code>
* okay)
* @param expecteds Object array or array of arrays (multi-dimensional array) with
* expected values.
* @param actuals Object array or array of arrays (multi-dimensional array) with
* actual values
*/
public static void assertArrayEquals(String message, Object[] expecteds, Object[] actuals) throws ArrayComparisonFailure {
internalArrayEquals(message, expecteds, actuals);
}Example 36
| Project: lcm-master File: Assert.java View source code |
/**
* Asserts that two object arrays are equal. If they are not, an
* {@link AssertionError} is thrown with the given message. If
* <code>expecteds</code> and <code>actuals</code> are <code>null</code>,
* they are considered equal.
*
* @param message the identifying message for the {@link AssertionError} (<code>null</code>
* okay)
* @param expecteds Object array or array of arrays (multi-dimensional array) with
* expected values.
* @param actuals Object array or array of arrays (multi-dimensional array) with
* actual values
*/
public static void assertArrayEquals(String message, Object[] expecteds, Object[] actuals) throws ArrayComparisonFailure {
internalArrayEquals(message, expecteds, actuals);
}Example 37
| Project: org.openntf.domino-master File: Assert.java View source code |
/**
* Asserts that two object arrays are equal. If they are not, an
* {@link AssertionError} is thrown with the given message. If
* <code>expecteds</code> and <code>actuals</code> are <code>null</code>,
* they are considered equal.
*
* @param message the identifying message for the {@link AssertionError} (<code>null</code>
* okay)
* @param expecteds Object array or array of arrays (multi-dimensional array) with
* expected values.
* @param actuals Object array or array of arrays (multi-dimensional array) with
* actual values
*/
public static void assertArrayEquals(String message, Object[] expecteds, Object[] actuals) throws ArrayComparisonFailure {
internalArrayEquals(message, expecteds, actuals);
}Example 38
| Project: spring-framework-master File: AnnotatedElementUtilsTests.java View source code |
private void assertWebMapping(AnnotatedElement element) throws ArrayComparisonFailure {
WebMapping webMapping = findMergedAnnotation(element, WebMapping.class);
assertNotNull(webMapping);
assertArrayEquals("value attribute: ", asArray("/test"), webMapping.value());
assertArrayEquals("path attribute: ", asArray("/test"), webMapping.path());
}Example 39
| Project: CallBuilder-master File: Assert.java View source code |
/**
* Asserts that two object arrays are equal. If they are not, an
* {@link AssertionError} is thrown with the given message. If
* <code>expecteds</code> and <code>actuals</code> are <code>null</code>,
* they are considered equal.
*
* @param message the identifying message for the {@link AssertionError} (<code>null</code>
* okay)
* @param expecteds Object array or array of arrays (multi-dimensional array) with
* expected values.
* @param actuals Object array or array of arrays (multi-dimensional array) with
* actual values
*/
public static void assertArrayEquals(String message, Object[] expecteds, Object[] actuals) throws ArrayComparisonFailure {
internalArrayEquals(message, expecteds, actuals);
}