Skip to content

Commit 92139dc

Browse files
committed
GP-145 Remove redundant System.out.println from the tests
1 parent 6d58bbc commit 92139dc

File tree

1 file changed

+8
-20
lines changed
  • 2-0-data-structures-and-algorithms/2-2-7-hash-table/src/test/java/com/bobocode/cs

1 file changed

+8
-20
lines changed

2-0-data-structures-and-algorithms/2-2-7-hash-table/src/test/java/com/bobocode/cs/HashTableTest.java

+8-20
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,8 @@
11
package com.bobocode.cs;
22

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.*;
106

117
import java.lang.reflect.Field;
128
import java.util.Arrays;
@@ -15,15 +11,11 @@
1511
import java.util.concurrent.ThreadLocalRandom;
1612
import java.util.stream.Collectors;
1713
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.*;
2719

2820
/**
2921
* 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() {
310302
"put element updates the value and returns the previous one when key is the same, should not increase table size")
311303
void putElementWithTheSameKey() {
312304
hashTable.put("madmax", 833);
313-
System.out.println(hashTable);
314305

315306
var previousValue = hashTable.put("madmax", 876);
316-
System.out.println(hashTable);
317307
var containsNewValueByKey = checkKeyValueExists("madmax", 876);
318308

319309
assertThat(previousValue).isEqualTo(833);
@@ -518,8 +508,6 @@ void resizeTable() {
518508
addToTable("AaAa", 123);
519509
addToTable("BBBB", 456);
520510

521-
System.out.println(hashTable);
522-
523511
hashTable.resizeTable(16);
524512

525513
assertThat(getInternalTable(hashTable)).hasSize(16);

0 commit comments

Comments
 (0)