We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36ef37e commit f819281Copy full SHA for f819281
src/test/java/pl/mperor/interview/tasks/QuizQuestionsTest.java
@@ -310,4 +310,12 @@ public void testThrowableInheritanceHierarchy() {
310
assertInstanceOf(Throwable.class, new Error());
311
assertInstanceOf(Exception.class, new RuntimeException());
312
}
313
+
314
+ @Test
315
+ public void testInstanceofIsNull() {
316
+ // Is instanceof null check necessary? What happens if null is passed?"
317
318
+ assertFalse(null instanceof Object);
319
+ assertTrue("null" instanceof Object);
320
+ }
321
0 commit comments