From c207a322fc9f7763fe26b0ae588d70c6ed4f3c1d Mon Sep 17 00:00:00 2001 From: samuelory Date: Thu, 14 Mar 2024 22:02:08 +0800 Subject: [PATCH] Added JUnit tests for Bouquet --- .../java/florizz/objects/BouquetTest.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 src/test/java/florizz/objects/BouquetTest.java diff --git a/src/test/java/florizz/objects/BouquetTest.java b/src/test/java/florizz/objects/BouquetTest.java new file mode 100644 index 0000000000..108899fb9a --- /dev/null +++ b/src/test/java/florizz/objects/BouquetTest.java @@ -0,0 +1,22 @@ +package florizz.objects; + +import org.junit.jupiter.api.Test; + +import static org.junit.jupiter.api.Assertions.*; + +public class BouquetTest { + @Test + void testToString() { + Bouquet testBouquet = new Bouquet("For Mom"); + assertEquals("For Mom", testBouquet.toString()); + } + + @Test + void testEquals(){ + Bouquet testBouquet1 = new Bouquet ("For Mom"); + Bouquet testBouquet2 = new Bouquet ("For Mom"); + Bouquet testBouquet3 = new Bouquet ("For GF"); + assertEquals(testBouquet1, testBouquet2); + assertNotEquals(testBouquet1, testBouquet3); + } +}