diff options
author | Haidong Ji | 2019-03-10 22:15:07 -0500 |
---|---|---|
committer | Haidong Ji | 2019-03-10 22:15:07 -0500 |
commit | 8fdeec331c424f2a7cfc98619e98a0d2420ddf7c (patch) | |
tree | cae12ff61f2e8b9d09c44b1d94041793b5911d30 /src/test/PhoneBookTest.java | |
parent | 8e0d78c1b52e84dfbdb2765d9c4183ab2116c2d1 (diff) |
Hash chain simulation done!
Created test cases for the hash function. Tested the code by running the
main function without writting test cases. I wish the starter code was
written in a way that facilitated testing...
Diffstat (limited to 'src/test/PhoneBookTest.java')
-rw-r--r-- | src/test/PhoneBookTest.java | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/test/PhoneBookTest.java b/src/test/PhoneBookTest.java deleted file mode 100644 index fb898f0..0000000 --- a/src/test/PhoneBookTest.java +++ /dev/null @@ -1,26 +0,0 @@ -import org.junit.jupiter.api.Test; - -import static org.junit.jupiter.api.Assertions.*; - -class PhoneBookTest { - @Test - void test() { - PhoneBook.add(911, "police"); - PhoneBook.add(76213, "Mom"); - PhoneBook.add(17239, "Bob"); - - assertEquals("Mom", PhoneBook.find(76213)); - assertEquals("not found", PhoneBook.find(910)); - assertEquals("police", PhoneBook.find(911)); - - PhoneBook.del(910); - PhoneBook.del(911); - - assertEquals("not found", PhoneBook.find(911)); - assertEquals("Mom", PhoneBook.find(76213)); - - PhoneBook.add(76213, "daddy"); - assertEquals("daddy", PhoneBook.find(76213)); - } - -}
\ No newline at end of file |