Bael 6556 - PR - 1st ~ 20 TC (#4359)

* Added parent module on poms that have no parent defined

* Removed dependency reduced pom from undertow module

* [BAEL-6556] - Enable our custom PMD rule and fix the build - Fixed Unit test case names
This commit is contained in:
Amit Pandey 2018-05-29 01:51:49 +05:30 committed by Grzegorz Piwowarek
parent 498c7604e1
commit ce645b67d2
23 changed files with 33 additions and 33 deletions

View File

@ -13,7 +13,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
public class HillClimbingAlgorithmTest { public class HillClimbingAlgorithmUnitTest {
private Stack<String> initStack; private Stack<String> initStack;
private Stack<String> goalStack; private Stack<String> goalStack;

View File

@ -6,7 +6,7 @@ import org.junit.Test;
import com.baeldung.algorithms.string.search.StringSearchAlgorithms; import com.baeldung.algorithms.string.search.StringSearchAlgorithms;
public class StringSearchAlgorithmsTest { public class StringSearchAlgorithmsUnitTest {
@Test @Test

View File

@ -7,7 +7,7 @@ import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import com.baeldung.algorithms.binarysearch.BinarySearch; import com.baeldung.algorithms.binarysearch.BinarySearch;
public class BinarySearchTest { public class BinarySearchUnitTest {
int[] sortedArray = { 0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 9 }; int[] sortedArray = { 0, 1, 2, 3, 4, 5, 5, 6, 7, 8, 9, 9 };
int key = 6; int key = 6;

View File

@ -15,7 +15,7 @@ import com.baeldung.algorithms.mcts.tictactoe.Board;
import com.baeldung.algorithms.mcts.tictactoe.Position; import com.baeldung.algorithms.mcts.tictactoe.Position;
import com.baeldung.algorithms.mcts.tree.Tree; import com.baeldung.algorithms.mcts.tree.Tree;
public class MCTSTest { public class MCTSUnitTest {
private Tree gameTree; private Tree gameTree;
private MonteCarloTreeSearch mcts; private MonteCarloTreeSearch mcts;

View File

@ -7,7 +7,7 @@ import static org.junit.Assert.*;
import com.baeldung.algorithms.minimax.MiniMax; import com.baeldung.algorithms.minimax.MiniMax;
import com.baeldung.algorithms.minimax.Tree; import com.baeldung.algorithms.minimax.Tree;
public class MinimaxTest { public class MinimaxUnitTest {
private Tree gameTree; private Tree gameTree;
private MiniMax miniMax; private MiniMax miniMax;

View File

@ -4,7 +4,7 @@ import static org.junit.Assert.*;
import org.junit.Test; import org.junit.Test;
public class BubbleSortTest { public class BubbleSortUnitTest {
@Test @Test
public void givenIntegerArray_whenSortedWithBubbleSort_thenGetSortedArray() { public void givenIntegerArray_whenSortedWithBubbleSort_thenGetSortedArray() {

View File

@ -7,13 +7,13 @@ import org.junit.runners.Parameterized;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
@RunWith(Parameterized.class) @RunWith(Parameterized.class)
public class EditDistanceTest extends EditDistanceDataProvider { public class EditDistanceUnitTest extends EditDistanceDataProvider {
private String x; private String x;
private String y; private String y;
private int result; private int result;
public EditDistanceTest(String a, String b, int res) { public EditDistanceUnitTest(String a, String b, int res) {
super(); super();
x = a; x = a;
y = b; y = b;

View File

@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class) @RunWith(value = Parameterized.class)
public class CycleDetectionBruteForceTest extends CycleDetectionTestBase { public class CycleDetectionBruteForceUnitTest extends CycleDetectionTestBase {
boolean cycleExists; boolean cycleExists;
Node<Integer> head; Node<Integer> head;
public CycleDetectionBruteForceTest(Node<Integer> head, boolean cycleExists) { public CycleDetectionBruteForceUnitTest(Node<Integer> head, boolean cycleExists) {
super(); super();
this.cycleExists = cycleExists; this.cycleExists = cycleExists;
this.head = head; this.head = head;

View File

@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class) @RunWith(value = Parameterized.class)
public class CycleDetectionByFastAndSlowIteratorsTest extends CycleDetectionTestBase { public class CycleDetectionByFastAndSlowIteratorsUnitTest extends CycleDetectionTestBase {
boolean cycleExists; boolean cycleExists;
Node<Integer> head; Node<Integer> head;
public CycleDetectionByFastAndSlowIteratorsTest(Node<Integer> head, boolean cycleExists) { public CycleDetectionByFastAndSlowIteratorsUnitTest(Node<Integer> head, boolean cycleExists) {
super(); super();
this.cycleExists = cycleExists; this.cycleExists = cycleExists;
this.head = head; this.head = head;

View File

@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class) @RunWith(value = Parameterized.class)
public class CycleDetectionByHashingTest extends CycleDetectionTestBase { public class CycleDetectionByHashingUnitTest extends CycleDetectionTestBase {
boolean cycleExists; boolean cycleExists;
Node<Integer> head; Node<Integer> head;
public CycleDetectionByHashingTest(Node<Integer> head, boolean cycleExists) { public CycleDetectionByHashingUnitTest(Node<Integer> head, boolean cycleExists) {
super(); super();
this.cycleExists = cycleExists; this.cycleExists = cycleExists;
this.head = head; this.head = head;

View File

@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class) @RunWith(value = Parameterized.class)
public class CycleRemovalBruteForceTest extends CycleDetectionTestBase { public class CycleRemovalBruteForceUnitTest extends CycleDetectionTestBase {
boolean cycleExists; boolean cycleExists;
Node<Integer> head; Node<Integer> head;
public CycleRemovalBruteForceTest(Node<Integer> head, boolean cycleExists) { public CycleRemovalBruteForceUnitTest(Node<Integer> head, boolean cycleExists) {
super(); super();
this.cycleExists = cycleExists; this.cycleExists = cycleExists;
this.head = head; this.head = head;

View File

@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class) @RunWith(value = Parameterized.class)
public class CycleRemovalByCountingLoopNodesTest extends CycleDetectionTestBase { public class CycleRemovalByCountingLoopNodesUnitTest extends CycleDetectionTestBase {
boolean cycleExists; boolean cycleExists;
Node<Integer> head; Node<Integer> head;
public CycleRemovalByCountingLoopNodesTest(Node<Integer> head, boolean cycleExists) { public CycleRemovalByCountingLoopNodesUnitTest(Node<Integer> head, boolean cycleExists) {
super(); super();
this.cycleExists = cycleExists; this.cycleExists = cycleExists;
this.head = head; this.head = head;

View File

@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized; import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class) @RunWith(value = Parameterized.class)
public class CycleRemovalWithoutCountingLoopNodesTest extends CycleDetectionTestBase { public class CycleRemovalWithoutCountingLoopNodesUnitTest extends CycleDetectionTestBase {
boolean cycleExists; boolean cycleExists;
Node<Integer> head; Node<Integer> head;
public CycleRemovalWithoutCountingLoopNodesTest(Node<Integer> head, boolean cycleExists) { public CycleRemovalWithoutCountingLoopNodesUnitTest(Node<Integer> head, boolean cycleExists) {
super(); super();
this.cycleExists = cycleExists; this.cycleExists = cycleExists;
this.head = head; this.head = head;

View File

@ -6,7 +6,7 @@ import org.junit.Test;
import com.baeldung.algorithms.numberwordconverter.NumberWordConverter; import com.baeldung.algorithms.numberwordconverter.NumberWordConverter;
public class NumberWordConverterTest { public class NumberWordConverterUnitTest {
@Test @Test
public void whenMoneyNegative_thenReturnInvalidInput() { public void whenMoneyNegative_thenReturnInvalidInput() {

View File

@ -7,7 +7,7 @@ import java.util.List;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.*; import static org.junit.Assert.*;
public class PrimeGeneratorTest { public class PrimeGeneratorUnitTest {
@Test @Test
public void whenBruteForced_returnsSuccessfully() { public void whenBruteForced_returnsSuccessfully() {
final List<Integer> primeNumbers = primeNumbersBruteForce(20); final List<Integer> primeNumbers = primeNumbersBruteForce(20);

View File

@ -12,7 +12,7 @@ import org.jgrapht.graph.SimpleWeightedGraph;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
public class CompleteGraphTest { public class CompleteGraphUnitTest {
static SimpleWeightedGraph<String, DefaultEdge> completeGraph; static SimpleWeightedGraph<String, DefaultEdge> completeGraph;
static int size = 10; static int size = 10;

View File

@ -24,7 +24,7 @@ import org.jgrapht.traverse.DepthFirstIterator;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
public class DirectedGraphTests { public class DirectedGraphUnitTests {
DirectedGraph<String, DefaultEdge> directedGraph; DirectedGraph<String, DefaultEdge> directedGraph;
@Before @Before

View File

@ -12,7 +12,7 @@ import org.jgrapht.graph.SimpleWeightedGraph;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
public class EulerianCircuitTest { public class EulerianCircuitUnitTest {
SimpleWeightedGraph<String, DefaultEdge> simpleGraph; SimpleWeightedGraph<String, DefaultEdge> simpleGraph;
@Before @Before

View File

@ -6,7 +6,7 @@ import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.RetryNTimes; import org.apache.curator.retry.RetryNTimes;
import org.junit.Before; import org.junit.Before;
public abstract class BaseTest { public abstract class BaseManualTest {
@Before @Before
public void setup() { public void setup() {

View File

@ -12,9 +12,9 @@ import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.x.async.AsyncCuratorFramework; import org.apache.curator.x.async.AsyncCuratorFramework;
import org.junit.Test; import org.junit.Test;
import com.baeldung.apache.curator.BaseTest; import com.baeldung.apache.curator.BaseManualTest;
public class ConfigurationManagementManualTest extends BaseTest { public class ConfigurationManagementManualTest extends BaseManualTest {
private static final String KEY_FORMAT = "/%s"; private static final String KEY_FORMAT = "/%s";

View File

@ -11,9 +11,9 @@ import org.apache.curator.x.async.modeled.ModeledFramework;
import org.apache.curator.x.async.modeled.ZPath; import org.apache.curator.x.async.modeled.ZPath;
import org.junit.Test; import org.junit.Test;
import com.baeldung.apache.curator.BaseTest; import com.baeldung.apache.curator.BaseManualTest;
public class ModelTypedExamplesManualTest extends BaseTest { public class ModelTypedExamplesManualTest extends BaseManualTest {
@Test @Test
public void givenPath_whenStoreAModel_thenNodesAreCreated() public void givenPath_whenStoreAModel_thenNodesAreCreated()

View File

@ -10,9 +10,9 @@ import org.apache.curator.framework.recipes.shared.SharedCount;
import org.apache.curator.framework.state.ConnectionState; import org.apache.curator.framework.state.ConnectionState;
import org.junit.Test; import org.junit.Test;
import com.baeldung.apache.curator.BaseTest; import com.baeldung.apache.curator.BaseManualTest;
public class RecipesManualTest extends BaseTest { public class RecipesManualTest extends BaseManualTest {
@Test @Test
public void givenRunningZookeeper_whenUsingLeaderElection_thenNoErrors() { public void givenRunningZookeeper_whenUsingLeaderElection_thenNoErrors() {

View File

@ -10,7 +10,7 @@ import opennlp.tools.tokenize.SimpleTokenizer;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test; import org.junit.Test;
public class ChunkerTest { public class ChunkerUnitTest {
@Test @Test
public void givenChunkerModel_whenChunk_thenChunksAreDetected() throws Exception { public void givenChunkerModel_whenChunk_thenChunksAreDetected() throws Exception {