We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1c39024 commit 81561ddCopy full SHA for 81561dd
src/test/java/com/thealgorithms/datastructures/dictionary/DictionaryTest.java
@@ -0,0 +1,20 @@
1
+package com.thealgorithms.datastructures.dictionary;
2
+
3
+import org.junit.jupiter.api.Assertions;
4
+import org.junit.jupiter.api.Test;
5
6
+public class DictionaryTest {
7
8
+ @Test
9
+ void test() {
10
+ Dictionary dict = new Dictionary("asdf", "a");
11
+ Assertions.assertEquals(dict.get("asdf"), "a");
12
+ dict.put("aa", "hello");
13
+ Assertions.assertEquals(dict.get("aa"), "hello");
14
+ dict.put("aa", "aaa");
15
+ Assertions.assertEquals(dict.get("aa"), "aaa");
16
+ dict.remove("aa");
17
+ Assertions.assertEquals(dict.get("aa"), null);
18
+ Assertions.assertEquals(dict.containsKey("aa"), false);
19
+ }
20
+}
0 commit comments