mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
TestFramework: 'assertInstanceOf' logging improved
This commit is contained in:
@@ -468,7 +468,7 @@ public abstract class UsefulTestCase extends TestCase {
|
||||
}
|
||||
|
||||
public static <T> T assertInstanceOf(Object o, Class<T> aClass) {
|
||||
Assert.assertNotNull(o);
|
||||
Assert.assertNotNull("Expected instance of: " + aClass.getName() + " actual: " + null, o);
|
||||
Assert.assertTrue("Expected instance of: " + aClass.getName() + " actual: " + o.getClass().getName(), aClass.isInstance(o));
|
||||
return (T)o;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user