From 562bd31373f758a280ac57165568509fa2a2910a Mon Sep 17 00:00:00 2001 From: David Hermann Date: Wed, 1 Feb 2023 20:09:20 +0100 Subject: [PATCH] unittest: created test for mob class This tests whether the mob is friendly --- .../org/bitbiome/entitiesTest/MobTest.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/test/java/org/bitbiome/entitiesTest/MobTest.java diff --git a/src/test/java/org/bitbiome/entitiesTest/MobTest.java b/src/test/java/org/bitbiome/entitiesTest/MobTest.java new file mode 100644 index 0000000..b11f4ce --- /dev/null +++ b/src/test/java/org/bitbiome/entitiesTest/MobTest.java @@ -0,0 +1,24 @@ +package org.bitbiome.entitiesTest; +import static org.junit.jupiter.api.Assertions.assertEquals; +import org.bitbiome.entities.Mob; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; + + +public class MobTest { + + private static Mob mob; + + @BeforeAll + public static void setMob() { + mob = new Mob(); + mob.setFriendly(true); + } + + + @Test + public void testFriendly() { + assertEquals(mob.isFriendly(), true); + } + +}