|
1 | 1 | package com.bobocode.cs;
|
2 | 2 |
|
3 |
| -import static java.lang.reflect.Modifier.isStatic; |
4 |
| -import static org.assertj.core.api.Assertions.assertThat; |
5 |
| -import static org.assertj.core.api.Assertions.assertThatThrownBy; |
6 |
| -import static org.junit.jupiter.api.Assertions.assertEquals; |
7 |
| -import static org.junit.jupiter.api.Assertions.assertFalse; |
8 |
| -import static org.junit.jupiter.api.Assertions.assertNull; |
9 |
| -import static org.junit.jupiter.api.Assertions.assertTrue; |
| 3 | +import lombok.SneakyThrows; |
| 4 | +import org.junit.jupiter.api.ClassOrderer.OrderAnnotation; |
| 5 | +import org.junit.jupiter.api.*; |
10 | 6 |
|
11 | 7 | import java.lang.reflect.Field;
|
12 | 8 | import java.util.Arrays;
|
|
15 | 11 | import java.util.concurrent.ThreadLocalRandom;
|
16 | 12 | import java.util.stream.Collectors;
|
17 | 13 | import java.util.stream.Stream;
|
18 |
| -import lombok.SneakyThrows; |
19 |
| -import org.junit.jupiter.api.ClassOrderer.OrderAnnotation; |
20 |
| -import org.junit.jupiter.api.DisplayName; |
21 |
| -import org.junit.jupiter.api.MethodOrderer; |
22 |
| -import org.junit.jupiter.api.Nested; |
23 |
| -import org.junit.jupiter.api.Order; |
24 |
| -import org.junit.jupiter.api.Test; |
25 |
| -import org.junit.jupiter.api.TestClassOrder; |
26 |
| -import org.junit.jupiter.api.TestMethodOrder; |
| 14 | + |
| 15 | +import static java.lang.reflect.Modifier.isStatic; |
| 16 | +import static org.assertj.core.api.Assertions.assertThat; |
| 17 | +import static org.assertj.core.api.Assertions.assertThatThrownBy; |
| 18 | +import static org.junit.jupiter.api.Assertions.*; |
27 | 19 |
|
28 | 20 | /**
|
29 | 21 | * A Reflection-based step by step test for a {@link HashTable} class. PLEASE NOTE that Reflection API should not be used
|
@@ -310,10 +302,8 @@ void putTwoElementsWithTheSameHashCode() {
|
310 | 302 | "put element updates the value and returns the previous one when key is the same, should not increase table size")
|
311 | 303 | void putElementWithTheSameKey() {
|
312 | 304 | hashTable.put("madmax", 833);
|
313 |
| - System.out.println(hashTable); |
314 | 305 |
|
315 | 306 | var previousValue = hashTable.put("madmax", 876);
|
316 |
| - System.out.println(hashTable); |
317 | 307 | var containsNewValueByKey = checkKeyValueExists("madmax", 876);
|
318 | 308 |
|
319 | 309 | assertThat(previousValue).isEqualTo(833);
|
@@ -518,8 +508,6 @@ void resizeTable() {
|
518 | 508 | addToTable("AaAa", 123);
|
519 | 509 | addToTable("BBBB", 456);
|
520 | 510 |
|
521 |
| - System.out.println(hashTable); |
522 |
| - |
523 | 511 | hashTable.resizeTable(16);
|
524 | 512 |
|
525 | 513 | assertThat(getInternalTable(hashTable)).hasSize(16);
|
|
0 commit comments