/** * Asserts that the array of ints has a given length * * @param length expected length * @param array the array */ protected void assertLength(int length, int[] array) { assertEquals(length, array.length); }
public static void assertEquals(Object expected, Object actual) { assertEquals(null, expected, actual); }
/** * Asserts that the array of characters has a given length * * @param length expected length * @param array the array */ protected void assertLength(int length, char[] array) { assertEquals(length, array.length); }
/** * Asserts that the array of objects has a given length * * @param length expected length * @param array the array */ protected void assertLength(int length, Object[] array) { assertEquals(length, array.length); }
public static void assertEquals(String expected, String actual) { assertEquals(null, expected, actual); } }
/** * Asserts that the value of toString() on the given object matches the * given text string * * @param value the object to be output to the console * @param expected the expected String representation */ protected void assertToString(Object value, String expected) { Object console = InvokerHelper.invokeMethod(value, "toString", null); assertEquals("toString() on value: " + value, expected, console); }
/** * Asserts that the value of inspect() on the given object matches the * given text string * * @param value the object to be output to the console * @param expected the expected String representation */ protected void assertInspect(Object value, String expected) { Object console = InvokerHelper.invokeMethod(value, "inspect", null); assertEquals("inspect() on value: " + value, expected, console); }
/** * Asserts that the arrays are equivalent and contain the same values * * @param expected * @param value */ protected void assertArrayEquals(Object[] expected, Object[] value) { String message = "expected array: " + InvokerHelper.toString(expected) + " value array: " + InvokerHelper.toString(value); assertNotNull(message + ": expected should not be null", expected); assertNotNull(message + ": value should not be null", value); assertEquals(message, expected.length, value.length); for (int i = 0, size = expected.length; i < size; i++) { assertEquals("value[" + i + "] when " + message, expected[i], value[i]); } }
/** * Asserts that the array of characters has a given length * * @param length expected length * @param array the array */ protected void assertLength(int length, char[] array) { assertEquals(length, array.length); }
/** * Asserts that the array of objects has a given length * * @param length expected length * @param array the array */ protected void assertLength(int length, Object[] array) { assertEquals(length, array.length); }
/** * Asserts that the array of characters has a given length * * @param length expected length * @param array the array */ protected void assertLength(int length, char[] array) { assertEquals(length, array.length); }
/** * Asserts that the array of objects has a given length * * @param length expected length * @param array the array */ protected void assertLength(int length, Object[] array) { assertEquals(length, array.length); }
/** * Asserts that the array of ints has a given length * * @param length expected length * @param array the array */ protected void assertLength(int length, int[] array) { assertEquals(length, array.length); }
/** * Asserts that the array of ints has a given length * * @param length expected length * @param array the array */ protected void assertLength(int length, int[] array) { assertEquals(length, array.length); }
public static void assertEquals(String expected, String actual) { assertEquals(null, expected, actual); }
/** * Asserts that the array of ints has a given length * * @param length expected length * @param array the array */ protected void assertLength(int length, int[] array) { assertEquals(length, array.length); }
/** * Asserts that the value of toString() on the given object matches the * given text string * * @param value the object to be output to the console * @param expected the expected String representation */ protected void assertToString(Object value, String expected) { Object console = InvokerHelper.invokeMethod(value, "toString", null); assertEquals("toString() on value: " + value, expected, console); }
/** * Asserts that the value of inspect() on the given object matches the * given text string * * @param value the object to be output to the console * @param expected the expected String representation */ protected void assertInspect(Object value, String expected) { Object console = InvokerHelper.invokeMethod(value, "inspect", null); assertEquals("inspect() on value: " + value, expected, console); }
/** * Asserts that the value of toString() on the given object matches the * given text string * * @param value the object to be output to the console * @param expected the expected String representation */ protected void assertToString(Object value, String expected) { Object console = InvokerHelper.invokeMethod(value, "toString", null); assertEquals("toString() on value: " + value, expected, console); }
/** * Asserts that the value of toString() on the given object matches the * given text string * * @param value the object to be output to the console * @param expected the expected String representation */ protected void assertToString(Object value, String expected) { Object console = InvokerHelper.invokeMethod(value, "toString", null); assertEquals("toString() on value: " + value, expected, console); }