From 4b8e530ed01712c8d85d7684fbe7206f55a9224d Mon Sep 17 00:00:00 2001
From: Younis <nida.younis@hft-stuttgart.de>
Date: Tue, 24 Sep 2024 12:51:20 +0000
Subject: [PATCH] Add new file ClosetTest

---
 ClosetTest.java | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
 create mode 100644 ClosetTest.java

diff --git a/ClosetTest.java b/ClosetTest.java
new file mode 100644
index 0000000..bc541d7
--- /dev/null
+++ b/ClosetTest.java
@@ -0,0 +1,22 @@
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+public class ClosetTest {
+
+    @Test
+    public void testCloset() {
+        Closet myCloset = new MyCloset();
+        Clothing sweater1 = new Clothing("Red", "M");
+        Clothing sweater2 = new Clothing("Blue", "S");
+        Clothing pants1 = new Clothing("Black", "L");
+        Clothing pants2 = new Clothing("Blue", "S");
+
+        myCloset.addClothing(sweater1);
+        myCloset.addClothing(pants1);
+
+        assertTrue(myCloset.hasClothing(sweater1));
+        assertFalse(myCloset.hasClothing(sweater2));
+        assertTrue(myCloset.hasClothing(pants1));
+        assertFalse(myCloset.hasClothing(pants2));
+    }
+}
-- 
GitLab