Assert: assertSame(String message, Object expected, Object actual)
import junit.framework.TestCase;
public class TestLargest extends TestCase {
public TestLargest(String name) {
super(name);
}
public void testEmpty() {
assertSame("should be same", "expected", "actual");
}
}
Related examples in the same category
1. | extends TestCase | | |
2. | Assert.fail(String message) | | |
3. | Assert: assertEquals(Object expected, Object actual) | | |
4. | Assert: assertEquals(String expected, String actual) | | |
5. | Assert: assertEquals(String message, double expected, double actual, double precision) | | |
6. | Assert: assertEquals(int expected, int actual) | | |
7. | Assert: assertFalse(String message, boolean value) | | |
8. | Assert: assertNotSame(String message, Object expected, Object actual) | | |
9. | Assert: assertNull(String message, Object value) | | |
10. | Assert: assertTrue(String message, boolean value) | | |