From 148bcb09c28ebd8f1f60bdf76fa3190c7d899178 Mon Sep 17 00:00:00 2001 From: Kai Sellmann <2210892@stud.hs-mannheim.de> Date: Mon, 29 May 2023 10:12:40 +0200 Subject: [PATCH] ZooSimulationTest update --- .../vererbung/polymorphie/ZooSimulationTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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)); + + + } + }