diff --git a/sources/src/main/java/pr2/vererbung/polymorphie/ZooSimulationTest.java b/sources/src/main/java/pr2/vererbung/polymorphie/ZooSimulationTest.java index 787ac85..e917266 100644 --- a/sources/src/main/java/pr2/vererbung/polymorphie/ZooSimulationTest.java +++ b/sources/src/main/java/pr2/vererbung/polymorphie/ZooSimulationTest.java @@ -28,4 +28,19 @@ public class ZooSimulationTest { } + + void tiereArrayTesten() { + ZooTier albert = null; + ZooTier hauer = null; + ZooTier charlie = null; + + ZooTier[] tiere = {albert, charlie, hauer}; + + assertTrue(tiere.length == 3); + assertTrue(tiere[2] == hauer); + assertTrue(!(tiere[3] == null)); + + + } + }