Merge branch 'master' into BAEL-1689

This commit is contained in:
Loredana Crusoveanu
2018-06-02 23:27:19 +03:00
committed by GitHub
511 changed files with 6431 additions and 1262 deletions
+2
View File
@@ -40,3 +40,5 @@ This tutorials project is being built **[>> HERE](https://rest-security.ci.cloud
- [Apache Maven Standard Directory Layout](http://www.baeldung.com/maven-directory-structure)
- [Apache Maven Tutorial](http://www.baeldung.com/maven)
- [Designing a User Friendly Java Library](http://www.baeldung.com/design-a-user-friendly-java-library)
- [Java Service Provider Interface](http://www.baeldung.com/java-spi)
- [Java Streams vs Vavr Streams](http://www.baeldung.com/vavr-java-streams)
@@ -13,7 +13,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
public class HillClimbingAlgorithmTest {
public class HillClimbingAlgorithmUnitTest {
private Stack<String> initStack;
private Stack<String> goalStack;
@@ -6,7 +6,7 @@ import org.junit.Test;
import com.baeldung.algorithms.string.search.StringSearchAlgorithms;
public class StringSearchAlgorithmsTest {
public class StringSearchAlgorithmsUnitTest {
@Test
@@ -7,7 +7,7 @@ import org.junit.Assert;
import org.junit.Test;
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 key = 6;
@@ -15,7 +15,7 @@ import com.baeldung.algorithms.mcts.tictactoe.Board;
import com.baeldung.algorithms.mcts.tictactoe.Position;
import com.baeldung.algorithms.mcts.tree.Tree;
public class MCTSTest {
public class MCTSUnitTest {
private Tree gameTree;
private MonteCarloTreeSearch mcts;
@@ -7,7 +7,7 @@ import static org.junit.Assert.*;
import com.baeldung.algorithms.minimax.MiniMax;
import com.baeldung.algorithms.minimax.Tree;
public class MinimaxTest {
public class MinimaxUnitTest {
private Tree gameTree;
private MiniMax miniMax;
@@ -4,7 +4,7 @@ import static org.junit.Assert.*;
import org.junit.Test;
public class BubbleSortTest {
public class BubbleSortUnitTest {
@Test
public void givenIntegerArray_whenSortedWithBubbleSort_thenGetSortedArray() {
@@ -7,13 +7,13 @@ import org.junit.runners.Parameterized;
import static org.junit.Assert.assertEquals;
@RunWith(Parameterized.class)
public class EditDistanceTest extends EditDistanceDataProvider {
public class EditDistanceUnitTest extends EditDistanceDataProvider {
private String x;
private String y;
private int result;
public EditDistanceTest(String a, String b, int res) {
public EditDistanceUnitTest(String a, String b, int res) {
super();
x = a;
y = b;
@@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class)
public class CycleDetectionBruteForceTest extends CycleDetectionTestBase {
public class CycleDetectionBruteForceUnitTest extends CycleDetectionTestBase {
boolean cycleExists;
Node<Integer> head;
public CycleDetectionBruteForceTest(Node<Integer> head, boolean cycleExists) {
public CycleDetectionBruteForceUnitTest(Node<Integer> head, boolean cycleExists) {
super();
this.cycleExists = cycleExists;
this.head = head;
@@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class)
public class CycleDetectionByFastAndSlowIteratorsTest extends CycleDetectionTestBase {
public class CycleDetectionByFastAndSlowIteratorsUnitTest extends CycleDetectionTestBase {
boolean cycleExists;
Node<Integer> head;
public CycleDetectionByFastAndSlowIteratorsTest(Node<Integer> head, boolean cycleExists) {
public CycleDetectionByFastAndSlowIteratorsUnitTest(Node<Integer> head, boolean cycleExists) {
super();
this.cycleExists = cycleExists;
this.head = head;
@@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class)
public class CycleDetectionByHashingTest extends CycleDetectionTestBase {
public class CycleDetectionByHashingUnitTest extends CycleDetectionTestBase {
boolean cycleExists;
Node<Integer> head;
public CycleDetectionByHashingTest(Node<Integer> head, boolean cycleExists) {
public CycleDetectionByHashingUnitTest(Node<Integer> head, boolean cycleExists) {
super();
this.cycleExists = cycleExists;
this.head = head;
@@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class)
public class CycleRemovalBruteForceTest extends CycleDetectionTestBase {
public class CycleRemovalBruteForceUnitTest extends CycleDetectionTestBase {
boolean cycleExists;
Node<Integer> head;
public CycleRemovalBruteForceTest(Node<Integer> head, boolean cycleExists) {
public CycleRemovalBruteForceUnitTest(Node<Integer> head, boolean cycleExists) {
super();
this.cycleExists = cycleExists;
this.head = head;
@@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class)
public class CycleRemovalByCountingLoopNodesTest extends CycleDetectionTestBase {
public class CycleRemovalByCountingLoopNodesUnitTest extends CycleDetectionTestBase {
boolean cycleExists;
Node<Integer> head;
public CycleRemovalByCountingLoopNodesTest(Node<Integer> head, boolean cycleExists) {
public CycleRemovalByCountingLoopNodesUnitTest(Node<Integer> head, boolean cycleExists) {
super();
this.cycleExists = cycleExists;
this.head = head;
@@ -6,11 +6,11 @@ import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(value = Parameterized.class)
public class CycleRemovalWithoutCountingLoopNodesTest extends CycleDetectionTestBase {
public class CycleRemovalWithoutCountingLoopNodesUnitTest extends CycleDetectionTestBase {
boolean cycleExists;
Node<Integer> head;
public CycleRemovalWithoutCountingLoopNodesTest(Node<Integer> head, boolean cycleExists) {
public CycleRemovalWithoutCountingLoopNodesUnitTest(Node<Integer> head, boolean cycleExists) {
super();
this.cycleExists = cycleExists;
this.head = head;
@@ -6,7 +6,7 @@ import org.junit.Test;
import com.baeldung.algorithms.numberwordconverter.NumberWordConverter;
public class NumberWordConverterTest {
public class NumberWordConverterUnitTest {
@Test
public void whenMoneyNegative_thenReturnInvalidInput() {
@@ -7,7 +7,7 @@ import java.util.List;
import org.junit.Test;
import static org.junit.Assert.*;
public class PrimeGeneratorTest {
public class PrimeGeneratorUnitTest {
@Test
public void whenBruteForced_returnsSuccessfully() {
final List<Integer> primeNumbers = primeNumbersBruteForce(20);
@@ -12,7 +12,7 @@ import org.jgrapht.graph.SimpleWeightedGraph;
import org.junit.Before;
import org.junit.Test;
public class CompleteGraphTest {
public class CompleteGraphUnitTest {
static SimpleWeightedGraph<String, DefaultEdge> completeGraph;
static int size = 10;
@@ -24,7 +24,7 @@ import org.jgrapht.traverse.DepthFirstIterator;
import org.junit.Before;
import org.junit.Test;
public class DirectedGraphTests {
public class DirectedGraphUnitTest {
DirectedGraph<String, DefaultEdge> directedGraph;
@Before
@@ -12,7 +12,7 @@ import org.jgrapht.graph.SimpleWeightedGraph;
import org.junit.Before;
import org.junit.Test;
public class EulerianCircuitTest {
public class EulerianCircuitUnitTest {
SimpleWeightedGraph<String, DefaultEdge> simpleGraph;
@Before
@@ -6,7 +6,7 @@ import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.RetryNTimes;
import org.junit.Before;
public abstract class BaseTest {
public abstract class BaseManualTest {
@Before
public void setup() {
@@ -12,9 +12,9 @@ import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.x.async.AsyncCuratorFramework;
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";
@@ -11,9 +11,9 @@ import org.apache.curator.x.async.modeled.ModeledFramework;
import org.apache.curator.x.async.modeled.ZPath;
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
public void givenPath_whenStoreAModel_thenNodesAreCreated()
@@ -10,9 +10,9 @@ import org.apache.curator.framework.recipes.shared.SharedCount;
import org.apache.curator.framework.state.ConnectionState;
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
public void givenRunningZookeeper_whenUsingLeaderElection_thenNoErrors() {
@@ -10,7 +10,7 @@ import opennlp.tools.tokenize.SimpleTokenizer;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
public class ChunkerTest {
public class ChunkerUnitTest {
@Test
public void givenChunkerModel_whenChunk_thenChunksAreDetected() throws Exception {
@@ -19,7 +19,7 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.tuple;
import org.junit.Test;
public class LanguageDetectorAndTrainingDataTest {
public class LanguageDetectorAndTrainingDataUnitTest {
@Test
public void givenLanguageDictionary_whenLanguageDetect_thenLanguageIsDetected() throws FileNotFoundException, IOException {
@@ -8,7 +8,7 @@ import opennlp.tools.tokenize.SimpleTokenizer;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
public class LemmetizerTest {
public class LemmetizerUnitTest {
@Test
public void givenEnglishDictionary_whenLemmatize_thenLemmasAreDetected() throws Exception {
@@ -11,7 +11,7 @@ import opennlp.tools.util.Span;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
public class NamedEntityRecognitionTest {
public class NamedEntityRecognitionUnitTest {
@Test
public void givenEnglishPersonModel_whenNER_thenPersonsAreDetected() throws Exception {
@@ -7,7 +7,7 @@ import opennlp.tools.tokenize.SimpleTokenizer;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
public class POSTaggerTest {
public class POSTaggerUnitTest {
@Test
public void givenPOSModel_whenPOSTagging_thenPOSAreDetected() throws Exception {
@@ -6,7 +6,7 @@ import opennlp.tools.sentdetect.SentenceModel;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
public class SentenceDetectionTest {
public class SentenceDetectionUnitTest {
@Test
public void givenEnglishModel_whenDetect_thenSentencesAreDetected() throws Exception {
@@ -8,7 +8,7 @@ import opennlp.tools.tokenize.WhitespaceTokenizer;
import static org.assertj.core.api.Assertions.assertThat;
import org.junit.Test;
public class TokenizerTest {
public class TokenizerUnitTest {
@Test
public void givenEnglishModel_whenTokenize_thenTokensAreDetected() throws Exception {

Some files were not shown because too many files have changed in this diff Show More