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:
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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 {
|
||||
+1
-1
@@ -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
|
||||
+1
-1
@@ -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() {
|
||||
+1
-1
@@ -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
|
||||
+1
-1
@@ -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() {
|
||||
+1
-1
@@ -9,7 +9,7 @@ import java.time.temporal.ChronoUnit;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
public class JavaDurationTest {
|
||||
public class JavaDurationUnitTest {
|
||||
|
||||
@Test
|
||||
public void test2() {
|
||||
+2
-2
@@ -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() {
|
||||
+5
-5
@@ -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());
|
||||
+1
-1
@@ -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
|
||||
+1
-1
@@ -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;
|
||||
|
||||
+1
-1
@@ -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();
|
||||
+1
-1
@@ -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";
|
||||
+1
-1
@@ -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() {
|
||||
+1
-1
@@ -7,7 +7,7 @@ import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class HikariCPTest {
|
||||
public class HikariCPIntegrationTest {
|
||||
|
||||
@Test
|
||||
// @Ignore
|
||||
+1
-1
@@ -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 {
|
||||
+1
-1
@@ -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 {
|
||||
+1
-1
@@ -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 {
|
||||
+1
-1
@@ -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() {
|
||||
+1
-1
@@ -15,7 +15,7 @@ import org.junit.Test;
|
||||
|
||||
import com.baeldung.datetime.UseLocalDateTime;
|
||||
|
||||
public class StringConversionTest {
|
||||
public class StringConversionUnitTest {
|
||||
|
||||
@Test
|
||||
public void whenConvertedToInt_thenCorrect() {
|
||||
+1
-1
@@ -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() {
|
||||
+1
-1
@@ -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() {
|
||||
+2
-2
@@ -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
|
||||
+1
-1
@@ -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
|
||||
+1
-1
@@ -8,7 +8,7 @@ import java.io.IOException;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class AsyncEchoTest {
|
||||
public class AsyncEchoIntegrationTest {
|
||||
|
||||
Process server;
|
||||
AsyncEchoClient client;
|
||||
+2
-2
@@ -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);
|
||||
+2
-2
@@ -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");
|
||||
+2
-2
@@ -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() {
|
||||
+1
-1
@@ -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() {
|
||||
+2
-2
@@ -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() {
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user