Clear Sonar Blockers (#1643)
* remove debt from CachingTest https://sonarcloud.io/project/issues?fileUuids=AW3G0SevwB6UiZzQNqXR&id=iluwatar_java-design-patterns&open=AXK0Ozo--CiGJS70dLl0&resolved=false Signed-off-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com> * fixed few debts for Spatial Partition module Mainly convertig Hashtable to HashMaps Signed-off-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com> * fixed some logger norms Signed-off-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com> * fixed few errors as it got mixed with the stash Signed-off-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
This commit is contained in:
committed by
GitHub
parent
663dbd298e
commit
3f09fb70bb
@ -29,7 +29,7 @@ import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Hashtable;
|
||||
import java.util.HashMap;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
@ -63,11 +63,11 @@ class BubbleTest {
|
||||
void popTest() {
|
||||
var b1 = new Bubble(10, 10, 1, 2);
|
||||
var b2 = new Bubble(0, 0, 2, 2);
|
||||
var bubbles = new Hashtable<Integer, Bubble>();
|
||||
var bubbles = new HashMap<Integer, Bubble>();
|
||||
bubbles.put(1, b1);
|
||||
bubbles.put(2, b2);
|
||||
b1.pop(bubbles);
|
||||
//after popping, bubble no longer in hashtable containing all bubbles
|
||||
//after popping, bubble no longer in hashMap containing all bubbles
|
||||
assertNull(bubbles.get(1));
|
||||
assertNotNull(bubbles.get(2));
|
||||
}
|
||||
@ -77,7 +77,7 @@ class BubbleTest {
|
||||
var b1 = new Bubble(0, 0, 1, 2);
|
||||
var b2 = new Bubble(1, 1, 2, 1);
|
||||
var b3 = new Bubble(10, 10, 3, 1);
|
||||
var bubbles = new Hashtable<Integer, Bubble>();
|
||||
var bubbles = new HashMap<Integer, Bubble>();
|
||||
bubbles.put(1, b1);
|
||||
bubbles.put(2, b2);
|
||||
bubbles.put(3, b3);
|
||||
|
@ -26,7 +26,7 @@ package com.iluwatar.spatialpartition;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
import java.util.Hashtable;
|
||||
import java.util.HashMap;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
@ -41,7 +41,7 @@ class SpatialPartitionBubblesTest {
|
||||
var b2 = new Bubble(5, 5, 2, 1);
|
||||
var b3 = new Bubble(9, 9, 3, 1);
|
||||
var b4 = new Bubble(8, 8, 4, 2);
|
||||
var bubbles = new Hashtable<Integer, Bubble>();
|
||||
var bubbles = new HashMap<Integer, Bubble>();
|
||||
bubbles.put(1, b1);
|
||||
bubbles.put(2, b2);
|
||||
bubbles.put(3, b3);
|
||||
|
Reference in New Issue
Block a user