Fix test names (#1853)

* upgrade to spring boot 1.5.2

* add full update to REST API

* modify ratings controller

* upgrade herold

* fix integration test

* fix integration test

* minor fix

* fix integration test

* fix integration test

* minor cleanup

* minor cleanup

* remove log4j properties

* use standard logbook.xml

* remove log4j dependencies

* remove commons-logging

* merge

* fix conflict

* exclude commons-logging dependency

* cleanup

* minor fix

* minor fix

* fix dependency issues

* Revert "fix dependency issues"

This reverts commit 83bf1f9fd2e1a9a55f9cacb085669568b06b49ec.

* fix dependency issues

* minor fix

* minor fix

* minor fix

* cleanup generated files

* fix commons-logging issue

* add parent to pom

* cleanup parent dependencies

* cleanup pom

* cleanup pom

* add missing parent

* fix logging issue

* fix test names
This commit is contained in:
Doha2012 2017-05-15 18:35:14 +02:00 committed by Eugen
parent 5a58aacb8f
commit 48cd6f876f
369 changed files with 405 additions and 405 deletions

View File

@ -11,7 +11,7 @@ import static org.junit.Assert.assertNotNull;
/**
* Tests which show issues with JGit that we reported upstream.
*/
public class JGitBugTest {
public class JGitBugIntegrationTest {
@Test
public void testRevWalkDisposeClosesReader() throws IOException {
try (Repository repo = Helper.openJGitRepository()) {

View File

@ -2,7 +2,7 @@ package com.baeldung.jgit.porcelain;
import org.junit.Test;
public class PorcelainTest {
public class PorcelainUnitTest {
@Test
public void runSamples() throws Exception {
// simply call all the samples to see any severe problems with the samples

View File

@ -9,7 +9,7 @@ import org.junit.Test;
import twitter4j.TwitterException;
public class ApplicationTest {
public class ApplicationIntegrationTest {
/**
* In order run this jUnit test you need to configure your API details in the twitter4j.properties

View File

@ -5,7 +5,7 @@ import org.junit.Test;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class PrimeCheckerTest {
public class PrimeCheckerUnitTest {
private final BigIntegerPrimeChecker primeChecker = new BigIntegerPrimeChecker();

View File

@ -4,7 +4,7 @@ import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class PersonBuilderTest {
public class PersonBuilderUnitTest {
@Test
public void whenBuildPersonWithBuilder_thenObjectHasPropertyValues() {

View File

@ -17,7 +17,7 @@ import static org.junit.Assert.*;
import com.baeldung.model.User;
public class ValidationTest {
public class ValidationIntegrationTest {
private static ValidatorFactory validatorFactory;
private static Validator validator;

View File

@ -26,7 +26,7 @@ import org.apache.cxf.aegis.AegisReader;
import org.apache.cxf.aegis.AegisWriter;
import org.apache.cxf.aegis.type.AegisType;
public class BaeldungTest {
public class BaeldungIntegrationTest {
private AegisContext context;
private String fileName = "baeldung.xml";

View File

@ -21,7 +21,7 @@ import org.junit.Test;
import org.junit.Before;
import org.junit.After;
public class JExcelTest {
public class JExcelIntegrationTest {
private JExcelHelper jExcelHelper;
private static String FILE_NAME = "temp.xls";

View File

@ -18,7 +18,7 @@ import org.junit.Test;
import org.junit.Before;
import org.junit.After;
public class ExcelTest {
public class ExcelIntegrationTest {
private ExcelPOIHelper excelPOIHelper;
private static String FILE_NAME = "temp.xlsx";

View File

@ -14,12 +14,12 @@ import org.apache.poi.xwpf.usermodel.XWPFRun;
import org.junit.BeforeClass;
import org.junit.Test;
public class WordTest {
public class WordIntegrationTest {
static WordDocument wordDocument;
@BeforeClass
public static void generateMSWordFile() throws Exception {
WordTest.wordDocument = new WordDocument();
WordIntegrationTest.wordDocument = new WordDocument();
wordDocument.handleSimpleDoc();
}

View File

@ -6,7 +6,7 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class CrossPlatformServiceTest {
public class CrossPlatformServiceIntegrationTest {
private CrossPlatformServiceServer server = new CrossPlatformServiceServer();

View File

@ -12,7 +12,7 @@ import org.junit.Test;
import java.util.UUID;
public class MessagesAggregateTest {
public class MessagesAggregateIntegrationTest {
private FixtureConfiguration<MessagesAggregate> fixture;

View File

@ -10,7 +10,7 @@ import java.util.stream.Stream;
import org.junit.Test;
public class Java9OptionalsStreamTest {
public class Java9OptionalsStreamUnitTest {
private static List<Optional<String>> listOfOptionals = Arrays.asList(Optional.empty(), Optional.of("foo"), Optional.empty(), Optional.of("bar"));

View File

@ -11,7 +11,7 @@ import java.util.List;
import org.junit.Test;
public class MultiResultionImageTest {
public class MultiResultionImageUnitTest {
@Test
public void baseMultiResImageTest() {

View File

@ -6,7 +6,7 @@ import java.util.stream.Stream;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class OptionalToStreamTest {
public class OptionalToStreamUnitTest {
@Test
public void testOptionalToStream() {

View File

@ -5,7 +5,7 @@ import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class SetExamplesTest {
public class SetExamplesUnitTest {
@Test
public void testUnmutableSet() {

View File

@ -9,7 +9,7 @@ import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
public class CompletableFutureTest {
public class CompletableFutureUnitTest {
@Test
public void testDelay () throws Exception {
Object input = new Object();

View File

@ -24,7 +24,7 @@ import javax.net.ssl.SSLParameters;
import org.junit.Before;
import org.junit.Test;
public class SimpleHttpRequestsTest {
public class SimpleHttpRequestsUnitTest {
private URI httpURI;

View File

@ -2,7 +2,7 @@ package com.baeldung.java9.language;
import org.junit.Test;
public class DiamondTest {
public class DiamondUnitTest {
static class FooClass<X> {
FooClass(X x) {

View File

@ -3,7 +3,7 @@ package com.baeldung.java9.language;
import com.baeldung.java9.language.PrivateInterface;
import org.junit.Test;
public class PrivateInterfaceTest {
public class PrivateInterfaceUnitTest {
@Test
public void test() {

View File

@ -3,7 +3,7 @@ package com.baeldung.java9.language;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class TryWithResourcesTest {
public class TryWithResourcesUnitTest {
static int closeCount = 0;

View File

@ -9,7 +9,7 @@ import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
public class ListFactoryMethodsTest {
public class ListFactoryMethodsUnitTest {
@Test
public void whenListCreated_thenSuccess() {

View File

@ -8,7 +8,7 @@ import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
public class MapFactoryMethodsTest {
public class MapFactoryMethodsUnitTest {
@Test
public void whenMapCreated_thenSuccess() {

View File

@ -9,7 +9,7 @@ import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
public class SetFactoryMethodsTest {
public class SetFactoryMethodsUnitTest {
@Test
public void whenSetCreated_thenSuccess() {

View File

@ -8,7 +8,7 @@ import java.util.function.Function;
import static org.junit.Assert.assertEquals;
public class CollectorImprovementTest {
public class CollectorImprovementUnitTest {
@Test
public void givenList_whenSatifyPredicate_thenMapValueWithOccurences() {
List<Integer> numbers = List.of(1, 2, 3, 5, 5);

View File

@ -12,7 +12,7 @@ import java.util.stream.Stream;
import static java.lang.Integer.*;
import static org.junit.Assert.assertEquals;
public class StreamFeaturesTest {
public class StreamFeaturesUnitTest {
public static class TakeAndDropWhileTest {

View File

@ -16,7 +16,7 @@ import org.slf4j.LoggerFactory;
* Created by sanaulla on 2/23/2017.
*/
public class ProcessAPIEnhancementsTest {
public class ProcessAPIEnhancementsUnitTest {
Logger log = LoggerFactory.getLogger(ProcessAPIEnhancementsTest.class);

View File

@ -20,7 +20,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class ProcessApi {
public class ProcessApiUnitTest {
@Before
public void init() {

View File

@ -13,7 +13,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Stopwatch;
public class BaeldungBatchSubscriberImplTest {
public class BaeldungBatchSubscriberImplIntegrationTest {
private static final int ITEM_SIZE = 10;
private SubmissionPublisher<String> publisher;

View File

@ -13,7 +13,7 @@ import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Stopwatch;
public class BaeldungSubscriberImplTest {
public class BaeldungSubscriberImplIntegrationTest {
private static final int ITEM_SIZE = 10;
private SubmissionPublisher<String> publisher;

View File

@ -2,7 +2,7 @@ package com.baeldung.java9.stackwalker;
import org.junit.Test;
public class StackWalkerDemoTest {
public class StackWalkerDemoUnitTest {
@Test
public void giveStalkWalker_whenWalkingTheStack_thenShowStackFrames() {

View File

@ -9,7 +9,7 @@ import org.junit.Test;
import java.util.Arrays;
public class ArrayCopyUtilTest {
public class ArrayCopyUtilUnitTest {
private static Employee[] employees;
private static final int MAX = 2;

View File

@ -11,7 +11,7 @@ import java.util.stream.IntStream;
import static junit.framework.TestCase.assertEquals;
public class LongAccumulatorTest {
public class LongAccumulatorUnitTest {
@Test
public void givenLongAccumulator_whenApplyActionOnItFromMultipleThrads_thenShouldProduceProperResult() throws InterruptedException {

View File

@ -11,7 +11,7 @@ import java.util.stream.IntStream;
import static com.jayway.awaitility.Awaitility.await;
import static junit.framework.TestCase.assertEquals;
public class LongAdderTest {
public class LongAdderUnitTest {
@Test
public void givenMultipleThread_whenTheyWriteToSharedLongAdder_thenShouldCalculateSumForThem() throws InterruptedException {
//given

View File

@ -11,7 +11,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
import static org.assertj.core.api.Assertions.assertThat;
public class CopyOnWriteArrayListTest {
public class CopyOnWriteArrayListUnitTest {
@Test
public void givenCopyOnWriteList_whenIterateAndAddElementToUnderneathList_thenShouldNotChangeIterator() {

View File

@ -9,7 +9,7 @@ import java.util.concurrent.*;
import static junit.framework.TestCase.assertEquals;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class DelayQueueTest {
public class DelayQueueIntegrationTest {
@Test
public void givenDelayQueue_whenProduceElement_thenShouldConsumeAfterGivenDelay() throws InterruptedException {
//given

View File

@ -11,7 +11,7 @@ import java.util.concurrent.Phaser;
import static junit.framework.TestCase.assertEquals;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class PhaserTest {
public class PhaserUnitTest {
@Test
public void givenPhaser_whenCoordinateWorksBetweenThreads_thenShouldCoordinateBetweenMultiplePhases() {

View File

@ -9,7 +9,7 @@ import java.time.temporal.ChronoUnit;
import org.junit.Test;
public class JavaDurationTest {
public class JavaDurationUnitTest {
@Test
public void test2() {

View File

@ -9,9 +9,9 @@ import java.time.Period;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
public class JavaPeriodTest {
public class JavaPeriodUnitTest {
private static final Logger LOG = Logger.getLogger(JavaPeriodTest.class);
private static final Logger LOG = Logger.getLogger(JavaPeriodUnitTest.class);
@Test
public void whenTestPeriod_thenOk() {

View File

@ -9,18 +9,18 @@ import java.util.Map;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
public class DynamicProxyTest {
public class DynamicProxyIntegrationTest {
@Test
public void givenDynamicProxy_thenPutWorks() {
Map proxyInstance = (Map) Proxy.newProxyInstance(DynamicProxyTest.class.getClassLoader(), new Class[] { Map.class }, new DynamicInvocationHandler());
Map proxyInstance = (Map) Proxy.newProxyInstance(DynamicProxyIntegrationTest.class.getClassLoader(), new Class[] { Map.class }, new DynamicInvocationHandler());
proxyInstance.put("hello", "world");
}
@Test
public void givenInlineDynamicProxy_thenGetWorksOtherMethodsDoNot() {
Map proxyInstance = (Map) Proxy.newProxyInstance(DynamicProxyTest.class.getClassLoader(), new Class[] { Map.class }, (proxy, method, methodArgs) -> {
Map proxyInstance = (Map) Proxy.newProxyInstance(DynamicProxyIntegrationTest.class.getClassLoader(), new Class[] { Map.class }, (proxy, method, methodArgs) -> {
if (method.getName().equals("get")) {
return 42;
@ -43,12 +43,12 @@ public class DynamicProxyTest {
@Test
public void givenTimingDynamicProxy_thenMethodInvokationsProduceTiming() {
Map mapProxyInstance = (Map) Proxy.newProxyInstance(DynamicProxyTest.class.getClassLoader(), new Class[] { Map.class }, new TimingDynamicInvocationHandler(new HashMap<>()));
Map mapProxyInstance = (Map) Proxy.newProxyInstance(DynamicProxyIntegrationTest.class.getClassLoader(), new Class[] { Map.class }, new TimingDynamicInvocationHandler(new HashMap<>()));
mapProxyInstance.put("hello", "world");
assertEquals("world", mapProxyInstance.get("hello"));
CharSequence csProxyInstance = (CharSequence) Proxy.newProxyInstance(DynamicProxyTest.class.getClassLoader(), new Class[] { CharSequence.class }, new TimingDynamicInvocationHandler("Hello World"));
CharSequence csProxyInstance = (CharSequence) Proxy.newProxyInstance(DynamicProxyIntegrationTest.class.getClassLoader(), new Class[] { CharSequence.class }, new TimingDynamicInvocationHandler("Hello World"));
assertEquals('l', csProxyInstance.charAt(2));
assertEquals(11, csProxyInstance.length());

View File

@ -9,7 +9,7 @@ import static org.hamcrest.CoreMatchers.hasItems;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.fail;
public class GenericsTest {
public class GenericsUnitTest {
// testing the generic method with Integer
@Test

View File

@ -12,7 +12,7 @@ import org.unix4j.line.Line;
import static org.unix4j.unix.Grep.*;
import static org.unix4j.unix.cut.CutOption.*;
public class GrepWithUnix4JTest {
public class GrepWithUnix4JIntegrationTest {
private File fileToGrep;

View File

@ -9,7 +9,7 @@ import com.google.common.collect.EnumHashBiMap;
import com.google.common.collect.HashBiMap;
import com.google.common.collect.ImmutableBiMap;
public class GuavaBiMapTest {
public class GuavaBiMapUnitTest {
@Test
public void whenQueryByValue_returnsKey() {
final BiMap<String, String> capitalCountryBiMap = HashBiMap.create();

View File

@ -4,7 +4,7 @@ import org.junit.Test;
import static org.junit.Assert.*;
public class SHA256HashingTest {
public class SHA256HashingUnitTest {
private static String originalValue = "abc123";
private static String hashedValue = "6ca13d52ca70c883e0f0bb101e425a89e8624de51db2d2392593af6a84118090";

View File

@ -4,7 +4,7 @@ import static org.junit.Assert.assertEquals;
import org.junit.Test;
public class HexToAscii {
public class HexToAsciiUnitTest {
@Test
public static void whenHexToAscii() {

View File

@ -7,7 +7,7 @@ import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class HikariCPTest {
public class HikariCPIntegrationTest {
@Test
// @Ignore

View File

@ -17,7 +17,7 @@ import java.util.List;
import java.util.Map;
import java.util.Optional;
public class HttpRequestTest {
public class HttpRequestLiveTest {
@Test
public void whenGetRequest_thenOk() throws IOException {

View File

@ -8,7 +8,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
import static java.util.Arrays.asList;
import static org.junit.Assert.assertEquals;
public class ConcurrentModificationExceptionTest {
public class ConcurrentModificationExceptionUnitTest {
@Test
public void changingContentWithSetDoesNotThrowConcurrentModificationException() throws Exception {

View File

@ -12,7 +12,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertTrue;
public class ConcurrentNavigableMapManualTests {
public class ConcurrentNavigableMapManualTest {
@Test
public void givenSkipListMap_whenAccessInMultiThreads_thenOrderingStable() throws InterruptedException {

View File

@ -11,7 +11,7 @@ import java.util.stream.StreamSupport;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.collection.IsIterableContainingInOrder.contains;
public class IterableStreamConversionTest {
public class IterableStreamConversionUnitTest {
@Test
public void givenIterable_whenConvertedToStream_thenNotNull() {

View File

@ -15,7 +15,7 @@ import org.junit.Test;
import com.baeldung.datetime.UseLocalDateTime;
public class StringConversionTest {
public class StringConversionUnitTest {
@Test
public void whenConvertedToInt_thenCorrect() {

View File

@ -13,7 +13,7 @@ import static org.junit.Assert.assertEquals;
/***
* Example of counting chars in a String.
*/
public class CountCharsExample {
public class CountCharsExampleUnitTest {
@Test
public void givenString_whenUsingLoop_thenCountChars() {

View File

@ -11,7 +11,7 @@ import static java.util.stream.Collectors.collectingAndThen;
import static java.util.stream.Collectors.toSet;
import static org.junit.Assert.assertTrue;
public class DoubleBraceTest {
public class DoubleBraceUnitTest {
@Test
public void whenInitializeSetWithoutDoubleBraces_containsElements() {

View File

@ -9,8 +9,8 @@ import java.util.Map.Entry;
import static org.junit.Assert.*;
public class MapTest {
private static final Logger LOG = LoggerFactory.getLogger(MapTest.class);
public class MapUnitTest {
private static final Logger LOG = LoggerFactory.getLogger(MapUnitTest.class);
@Test

View File

@ -13,7 +13,7 @@ import java.util.UUID;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class FileTest {
public class FileIntegrationTest {
private static final String TEMP_DIR = String.format("%s/temp%s", System.getProperty("user.home"), UUID.randomUUID().toString());
@BeforeClass

View File

@ -8,7 +8,7 @@ import java.io.IOException;
import static org.junit.Assert.assertEquals;
public class AsyncEchoTest {
public class AsyncEchoIntegrationTest {
Process server;
AsyncEchoClient client;

View File

@ -16,7 +16,7 @@ import java.util.concurrent.Future;
import static org.junit.Assert.assertEquals;
public class AsyncFileTest {
public class AsyncFileIntegrationTest {
@Test
public void givenPath_whenReadsContentWithFuture_thenCorrect() throws IOException, ExecutionException, InterruptedException {
Path path = Paths.get(URI.create(this.getClass().getClassLoader().getResource("file.txt").toString()));
@ -36,7 +36,7 @@ public class AsyncFileTest {
@Test
public void givenPath_whenReadsContentWithCompletionHandler_thenCorrect() throws IOException {
Path path = Paths.get(URI.create(AsyncFileTest.class.getResource("/file.txt").toString()));
Path path = Paths.get(URI.create(AsyncFileIntegrationTest.class.getResource("/file.txt").toString()));
AsynchronousFileChannel fileChannel = AsynchronousFileChannel.open(path, StandardOpenOption.READ);
ByteBuffer buffer = ByteBuffer.allocate(1024);

View File

@ -16,9 +16,9 @@ import java.nio.file.attribute.FileTime;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class BasicAttribsTest {
public class BasicAttribsIntegrationTest {
private static final Logger LOG = LoggerFactory.getLogger(BasicAttribsTest.class);
private static final Logger LOG = LoggerFactory.getLogger(BasicAttribsIntegrationTest.class);
private static final String HOME = System.getProperty("user.home");

View File

@ -9,9 +9,9 @@ import java.util.*;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class SetTest {
public class SetUnitTest {
private static final Logger LOG = LoggerFactory.getLogger(SetTest.class);
private static final Logger LOG = LoggerFactory.getLogger(SetUnitTest.class);
@Test
public void givenTreeSet_whenRetrievesObjects_thenNaturalOrder() {

View File

@ -11,7 +11,7 @@ import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
public class Java8FindAnyFindFirstTest {
public class Java8FindAnyFindFirstUnitTest {
@Test
public void createStream_whenFindAnyResultIsPresent_thenCorrect() {

View File

@ -8,9 +8,9 @@ import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;
public class Java8ForEachTest {
public class Java8ForEachUnitTest {
private static final Logger LOG = LoggerFactory.getLogger(Java8ForEachTest.class);
private static final Logger LOG = LoggerFactory.getLogger(Java8ForEachUnitTest.class);
@Test
public void compareForEachMethods_thenPrintResults() {

View File

@ -10,7 +10,7 @@ import java.util.NoSuchElementException;
import static org.junit.Assert.assertEquals;
public class Java8MaxMinTest {
public class Java8MaxMinUnitTest {
@Test
public void whenListIsOfIntegerThenMaxCanBeDoneUsingIntegerComparator() {

View File

@ -8,7 +8,7 @@ import org.junit.Test;
import lombok.Data;
import static org.junit.Assert.assertTrue;
public class Java8ComparatorTest {
public class Java8ComparatorUnitTest {
private Employee[] employees;
private Employee[] employeesArrayWithNulls;

View File

@ -11,9 +11,9 @@ import java.util.List;
import static com.baeldung.java8.lambda.exceptions.LambdaExceptionWrappers.*;
public class LambdaExceptionWrappersTest {
public class LambdaExceptionWrappersUnitTest {
private static final Logger LOG = LoggerFactory.getLogger(LambdaExceptionWrappersTest.class);
private static final Logger LOG = LoggerFactory.getLogger(LambdaExceptionWrappersUnitTest.class);
private List<Integer> integers;

View File

@ -13,9 +13,9 @@ import java.util.Optional;
import static org.junit.Assert.*;
public class OptionalTest {
public class OptionalUnitTest {
private static final Logger LOG = LoggerFactory.getLogger(OptionalTest.class);
private static final Logger LOG = LoggerFactory.getLogger(OptionalUnitTest.class);
// creating Optional

View File

@ -21,9 +21,9 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class JdbcTest {
public class JdbcIntegrationTest {
private static final Logger LOG = Logger.getLogger(JdbcTest.class);
private static final Logger LOG = Logger.getLogger(JdbcIntegrationTest.class);
private Connection con;

View File

@ -5,7 +5,7 @@ import static org.junit.Assert.assertEquals;
import org.junit.BeforeClass;
import org.junit.Test;
public class DivisibilityTest {
public class DivisibilityUnitTest {
private static int number;

View File

@ -11,12 +11,12 @@ import java.util.Arrays;
import java.util.Collection;
@RunWith(value = Parameterized.class)
public class ParametrizedTests {
public class ParametrizedUnitTest {
private int value;
private boolean isEven;
public ParametrizedTests(int value, boolean isEven) {
public ParametrizedUnitTest(int value, boolean isEven) {
this.value = value;
this.isEven = isEven;
}

View File

@ -5,8 +5,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class RegistrationTest {
private static final Logger LOGGER = LoggerFactory.getLogger(RegistrationTest.class);
public class RegistrationUnitTest {
private static final Logger LOGGER = LoggerFactory.getLogger(RegistrationUnitTest.class);
@Test
public void whenCalledFromSuite_thanOK() {

View File

@ -4,8 +4,8 @@ import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SignInTest {
private static final Logger LOGGER = LoggerFactory.getLogger(SignInTest.class);
public class SignInUnitTest {
private static final Logger LOGGER = LoggerFactory.getLogger(SignInUnitTest.class);
@Test
public void whenCalledFromSuite_thanOK() {

View File

@ -7,7 +7,7 @@ import org.junit.Test;
import org.junit.runners.MethodSorters;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class SortedTests {
public class SortedUnitTest {
@Test
public void a_givenString_whenChangedtoInt_thenTrue() {

View File

@ -5,7 +5,7 @@ import static org.junit.Assert.assertEquals;
import org.junit.BeforeClass;
import org.junit.Test;
public class StringCaseTest {
public class StringCaseUnitTest {
private static String data;

View File

@ -4,7 +4,7 @@ import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({ RegistrationTest.class, SignInTest.class })
@Suite.SuiteClasses({ RegistrationUnitTest.class, SignInUnitTest.class })
public class SuiteTest {
}

View File

@ -11,7 +11,7 @@ import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
public class SummationServiceTest {
public class SummationServiceIntegrationTest {
private static List<Integer> numbers;
@BeforeClass

View File

@ -13,7 +13,7 @@ import java.util.stream.Collectors;
import org.hamcrest.collection.IsIterableContainingInOrder;
import org.junit.Test;
public class FlattenNestedListTest {
public class FlattenNestedListUnitTest {
List<List<String>> lol = asList(asList("one:one"), asList("two:one", "two:two", "two:three"), asList("three:one", "three:two", "three:three", "three:four"));
@Test

View File

@ -7,7 +7,7 @@ import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.Test;
public class ListOfListsTest {
public class ListOfListsUnitTest {
private List<ArrayList<? extends Stationery>> listOfLists = new ArrayList<ArrayList<? extends Stationery>>();
private ArrayList<Pen> penList = new ArrayList<>();

View File

@ -16,7 +16,7 @@ import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
public class MappedByteBufferTest {
public class MappedByteBufferUnitTest {
@Test

View File

@ -21,7 +21,7 @@ import java.util.Locale;
import static org.junit.Assert.*;
public class JavaMoneyTest {
public class JavaMoneyUnitTest {
@Test
public void givenCurrencyCode_whenString_thanExist() {

View File

@ -9,7 +9,7 @@ import java.io.InputStreamReader;
import java.util.List;
import java.util.Map;
public class NashornTest {
public class NashornUnitTest {
private ScriptEngine engine;
@ -20,17 +20,17 @@ public class NashornTest {
@Test
public void trim() throws ScriptException {
engine.eval(new InputStreamReader(NashornTest.class.getResourceAsStream("/js/trim.js")));
engine.eval(new InputStreamReader(NashornUnitTest.class.getResourceAsStream("/js/trim.js")));
}
@Test
public void locations() throws ScriptException {
engine.eval(new InputStreamReader(NashornTest.class.getResourceAsStream("/js/locations.js")));
engine.eval(new InputStreamReader(NashornUnitTest.class.getResourceAsStream("/js/locations.js")));
}
@Test
public void bindProperties() throws ScriptException {
engine.eval(new InputStreamReader(NashornTest.class.getResourceAsStream("/js/bind.js")));
engine.eval(new InputStreamReader(NashornUnitTest.class.getResourceAsStream("/js/bind.js")));
}
@Test
@ -40,7 +40,7 @@ public class NashornTest {
@Test
public void typedArrays() throws ScriptException {
engine.eval(new InputStreamReader(NashornTest.class.getResourceAsStream("/js/typed_arrays.js")));
engine.eval(new InputStreamReader(NashornUnitTest.class.getResourceAsStream("/js/typed_arrays.js")));
}
@Test

View File

@ -10,7 +10,7 @@ import java.io.ObjectOutputStream;
import org.junit.Test;
public class PersonTest {
public class PersonUnitTest {
@Test
public void whenSerializingAndDeserializing_ThenObjectIsTheSame() throws IOException, ClassNotFoundException {

View File

@ -13,7 +13,7 @@ import java.util.stream.Stream;
import static org.junit.Assert.assertEquals;
public class InfiniteStreamTest {
public class InfiniteStreamUnitTest {
@Test
public void givenInfiniteStream_whenUseIntermediateLimitMethod_thenShouldTerminateInFiniteTime() {

View File

@ -9,7 +9,7 @@ import org.junit.Test;
import com.baeldung.string.JoinerSplitter;
public class JoinerSplitterTest {
public class JoinerSplitterUnitTest {
@Test
public void provided_array_convert_to_stream_and_convert_to_string() {

View File

@ -11,7 +11,7 @@ import java.util.stream.StreamSupport;
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;
public class SplitTest {
public class SplitUnitTest {
@Test
public void givenString_whenSplit_thenRetrunsArray_through_JavaLangString() {

View File

@ -5,7 +5,7 @@ import static org.junit.Assert.assertNotEquals;
import org.apache.commons.lang3.StringUtils;
import org.junit.Test;
public class StringHelperTest {
public class StringHelperUnitTest {
public static final String TEST_STRING = "abcdef";
public static final String NULL_STRING = null;

View File

@ -7,7 +7,7 @@ import java.util.List;
import static org.junit.Assert.assertEquals;
public class TokenizerTest {
public class TokenizerUnitTest {
private final MyTokenizer myTokenizer = new MyTokenizer();
private final List<String> expectedTokensForString = Arrays.asList("Welcome", "to", "baeldung.com");

View File

@ -12,9 +12,9 @@ import java.util.concurrent.atomic.AtomicInteger;
import static junit.framework.TestCase.assertEquals;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class SynchronousQueueTest {
public class SynchronousQueueUnitTest {
private static final Logger LOG = LoggerFactory.getLogger(SynchronousQueueTest.class);
private static final Logger LOG = LoggerFactory.getLogger(SynchronousQueueUnitTest.class);
@Test

View File

@ -14,7 +14,7 @@ import java.util.stream.IntStream;
import static junit.framework.Assert.assertTrue;
import static junit.framework.TestCase.assertEquals;
public class UnsafeTest {
public class UnsafeUnitTest {
private Unsafe unsafe;

View File

@ -9,7 +9,7 @@ import java.util.concurrent.TimeUnit;
import static com.jayway.awaitility.Awaitility.await;
import static org.junit.Assert.assertTrue;
public class WeakHashMapTest {
public class WeakHashMapUnitTest {
@Test
public void givenWeakHashMap_whenCacheValueThatHasNoReferenceToIt_GCShouldReclaimThatObject() {

View File

@ -20,7 +20,7 @@ import org.junit.Test;
import com.google.common.primitives.Ints;
public class JavaSorting {
public class JavaSortingUnitTest {
private int[] toSort;
private int[] sortedInts;

View File

@ -38,7 +38,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(Arquillian.class)
public class MemberRegistrationTest {
public class MemberRegistrationIntegrationTest {
@Deployment
public static Archive<?> createTestArchive() {
File[] files = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve().withTransitivity().asFile();

View File

@ -11,7 +11,7 @@ import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
public class DozerTest {
public class DozerIntegrationTest {
private final long GMT_DIFFERENCE = 46800000;
DozerBeanMapper mapper;

View File

@ -6,7 +6,7 @@ import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class EJBSetupTest {
public class EJBSetupIntegrationTest {
@Test
public void EJBClientTest() {

View File

@ -11,7 +11,7 @@ import org.junit.Test;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
public class GsonDeserializeTest {
public class GsonDeserializeUnitTest {
@Test
public void whenSimpleDeserialize_thenCorrect() throws ParseException {

View File

@ -25,7 +25,7 @@ import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import com.google.gson.reflect.TypeToken;
public class GsonDeserializationTest {
public class GsonDeserializationUnitTest {
// tests - single element

View File

@ -13,7 +13,7 @@ import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Arrays;
public class GsonSerializeTest {
public class GsonSerializeUnitTest {
@Test
public void whenSimpleSerialize_thenCorrect() throws ParseException {

View File

@ -21,7 +21,7 @@ import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
public class GsonSerializationTest {
public class GsonSerializationUnitTest {
@Test
public void givenArrayOfObjects_whenSerializing_thenCorrect() {

View File

@ -6,7 +6,7 @@ import org.junit.Test;
import static org.junit.Assert.*;
public class ClassToInstanceMapTests {
public class ClassToInstanceMapUnitTest {
@Test
public void whenOfCalled_thenCreateEmptyImmutableMap() {
ClassToInstanceMap<Action> map = ImmutableClassToInstanceMap.of();

View File

@ -9,7 +9,7 @@ import java.util.stream.IntStream;
import static org.assertj.core.api.Java6Assertions.assertThat;
public class EvictingQueueTest {
public class EvictingQueueUnitTest {
@Test
public void givenEvictingQueue_whenAddElementToFull_thenShouldEvictOldestItem() {

View File

@ -10,7 +10,7 @@ import org.junit.Test;
import com.google.common.math.BigIntegerMath;
public class GuavaBigIntegerMathTest {
public class GuavaBigIntegerMathUnitTest {
@Test
public void whenPerformBinomialOnTwoIntValues_shouldReturnResult() {

View File

@ -15,7 +15,7 @@ import static com.google.common.collect.Iterables.cycle;
import static com.google.common.collect.Maps.newHashMap;
import static org.assertj.core.api.Assertions.assertThat;
public class GuavaCacheLoaderTest {
public class GuavaCacheLoaderUnitTest {
int callCount = 0;
@Test

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