Leon 5 年之前
父節點
當前提交
aa72d9a451

+ 2
- 2
src/test/java/rocks/zipcode/quiz5/objectorientation/employee/EmployeePolymorphismTest.java 查看文件

@@ -24,8 +24,8 @@ public class EmployeePolymorphismTest {
24 24
     }
25 25
 
26 26
 
27
-    @Test
27
+    @Test(expected = ClassCastException.class)
28 28
     public void test3() {
29
-        Assert.assertFalse((Account) (Object) employee instanceof Account);
29
+        Account account = (Account) (Object) employee;
30 30
     }
31 31
 }