Change group id to es.upv.grycap

This commit is contained in:
etorres
2015-12-21 23:20:35 +01:00
parent 825024b2ee
commit e36feb10a2
33 changed files with 115 additions and 113 deletions
+3 -3
View File
@@ -25,7 +25,7 @@ that you distribute must include a readable copy of the "NOTICE" text file.
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.grycap.coreutils</groupId>
<groupId>es.upv.grycap.coreutils</groupId>
<artifactId>coreutils</artifactId>
<version>0.1.0</version>
</parent>
@@ -38,9 +38,9 @@ that you distribute must include a readable copy of the "NOTICE" text file.
<dependencies>
<!-- GRyCAP common utilities -->
<dependency>
<groupId>org.grycap.coreutils</groupId>
<groupId>es.upv.grycap.coreutils</groupId>
<artifactId>coreutils-test</artifactId>
<version>${org.grycap.coreutils.version}</version>
<version>${es.upv.grycap.coreutils.version}</version>
<scope>test</scope>
</dependency>
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.common;
package es.upv.grycap.coreutils.common;
import static org.apache.commons.lang3.StringUtils.trimToNull;
+6 -6
View File
@@ -26,7 +26,7 @@ that you distribute must include a readable copy of the "NOTICE" text file.
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.grycap.coreutils</groupId>
<groupId>es.upv.grycap.coreutils</groupId>
<artifactId>coreutils</artifactId>
<version>0.1.0</version>
</parent>
@@ -39,14 +39,14 @@ that you distribute must include a readable copy of the "NOTICE" text file.
<dependencies>
<!-- GRyCAP common utilities -->
<dependency>
<groupId>org.grycap.coreutils</groupId>
<groupId>es.upv.grycap.coreutils</groupId>
<artifactId>coreutils-logging</artifactId>
<version>${org.grycap.coreutils.version}</version>
<version>${es.upv.grycap.coreutils.version}</version>
</dependency>
<dependency>
<groupId>org.grycap.coreutils</groupId>
<groupId>es.upv.grycap.coreutils</groupId>
<artifactId>coreutils-test</artifactId>
<version>${org.grycap.coreutils.version}</version>
<version>${es.upv.grycap.coreutils.version}</version>
<scope>test</scope>
</dependency>
@@ -249,7 +249,7 @@ that you distribute must include a readable copy of the "NOTICE" text file.
<groupId>org.mock-server</groupId>
<artifactId>mockserver-maven-plugin</artifactId>
<configuration>
<initializationClass>org.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer</initializationClass>
<initializationClass>es.upv.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer</initializationClass>
</configuration>
</plugin>
<!-- Maven Surefire Plugin -->
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.http;
package es.upv.grycap.coreutils.fiber.http;
import static com.google.common.collect.Lists.newArrayList;
import static java.nio.file.Files.createTempDirectory;
@@ -21,18 +21,18 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.http;
package es.upv.grycap.coreutils.fiber.http;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.ImmutableMap.of;
import static es.upv.grycap.coreutils.fiber.net.UrlBuilder.getUrlBuilder;
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
import static java.util.Collections.synchronizedList;
import static java.util.Objects.requireNonNull;
import static java.util.Optional.ofNullable;
import static org.apache.commons.lang3.StringUtils.removeEnd;
import static org.apache.commons.lang3.StringUtils.trimToNull;
import static org.grycap.coreutils.fiber.net.UrlBuilder.getUrlBuilder;
import static org.slf4j.LoggerFactory.getLogger;
import java.io.File;
@@ -66,12 +66,12 @@ import org.apache.http.message.BasicHttpRequest;
import org.apache.http.nio.client.methods.ZeroCopyConsumer;
import org.apache.http.nio.protocol.BasicAsyncRequestProducer;
import org.apache.http.nio.protocol.HttpAsyncRequestProducer;
import org.grycap.coreutils.fiber.net.UrlBuilder;
import org.slf4j.Logger;
import com.google.common.collect.Range;
import co.paralleluniverse.fibers.httpasyncclient.FiberCloseableHttpAsyncClient;
import es.upv.grycap.coreutils.fiber.net.UrlBuilder;
/**
* High-concurrency data fetcher. Note that this class will name fetched files using a convention-over-configuration pattern
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.net;
package es.upv.grycap.coreutils.fiber.net;
import static java.net.URLDecoder.decode;
import static java.nio.charset.Charset.defaultCharset;
@@ -21,10 +21,10 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test;
package es.upv.grycap.coreutils.fiber.test;
import static es.upv.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer.MOCK_SERVER_BASE_URL;
import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric;
import static org.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer.MOCK_SERVER_BASE_URL;
import static org.hamcrest.CoreMatchers.not;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -38,11 +38,6 @@ import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
import org.grycap.coreutils.fiber.http.HttpDataFetcher;
import org.grycap.coreutils.fiber.http.HttpDataFetcher.FetchStatus;
import org.grycap.coreutils.test.category.IntegrationTests;
import org.grycap.coreutils.test.rules.TestPrinter;
import org.grycap.coreutils.test.rules.TestWatcher2;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -52,6 +47,11 @@ import org.junit.rules.TestRule;
import com.google.common.collect.ImmutableList;
import co.paralleluniverse.fibers.futures.AsyncCompletionStage;
import es.upv.grycap.coreutils.fiber.http.HttpDataFetcher;
import es.upv.grycap.coreutils.fiber.http.HttpDataFetcher.FetchStatus;
import es.upv.grycap.coreutils.test.category.IntegrationTests;
import es.upv.grycap.coreutils.test.rules.TestPrinter;
import es.upv.grycap.coreutils.test.rules.TestWatcher2;
/**
* Tests data fetching with cancellation.
@@ -21,14 +21,14 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test;
package es.upv.grycap.coreutils.fiber.test;
import static es.upv.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer.MOCK_SERVER_BASE_URL;
import static es.upv.grycap.coreutils.fiber.test.mockserver.ObjectResponseValidator.validateJson;
import static es.upv.grycap.coreutils.fiber.test.mockserver.ObjectResponseValidator.validateXml;
import static java.util.Collections.emptyList;
import static org.apache.commons.collections.ListUtils.union;
import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric;
import static org.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer.MOCK_SERVER_BASE_URL;
import static org.grycap.coreutils.fiber.test.mockserver.ObjectResponseValidator.validateJson;
import static org.grycap.coreutils.fiber.test.mockserver.ObjectResponseValidator.validateXml;
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.hasItem;
@@ -46,12 +46,6 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import org.grycap.coreutils.fiber.http.HttpDataFetcher;
import org.grycap.coreutils.fiber.http.HttpDataFetcher.FecthFuture;
import org.grycap.coreutils.fiber.http.HttpDataFetcher.FetchStatus;
import org.grycap.coreutils.test.category.IntegrationTests;
import org.grycap.coreutils.test.rules.TestPrinter;
import org.grycap.coreutils.test.rules.TestWatcher2;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -65,6 +59,12 @@ import org.junit.runners.Parameterized.Parameters;
import com.google.common.collect.ImmutableList;
import co.paralleluniverse.fibers.futures.AsyncCompletionStage;
import es.upv.grycap.coreutils.fiber.http.HttpDataFetcher;
import es.upv.grycap.coreutils.fiber.http.HttpDataFetcher.FecthFuture;
import es.upv.grycap.coreutils.fiber.http.HttpDataFetcher.FetchStatus;
import es.upv.grycap.coreutils.test.category.IntegrationTests;
import es.upv.grycap.coreutils.test.rules.TestPrinter;
import es.upv.grycap.coreutils.test.rules.TestWatcher2;
/**
* Tests data fetching.
@@ -21,20 +21,16 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test;
package es.upv.grycap.coreutils.fiber.test;
import static es.upv.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer.MOCK_SERVER_BASE_URL;
import static java.util.Collections.emptyList;
import static org.apache.commons.lang3.RandomStringUtils.randomAlphanumeric;
import static org.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer.MOCK_SERVER_BASE_URL;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import java.net.URL;
import org.grycap.coreutils.fiber.http.HttpDataFetcher;
import org.grycap.coreutils.test.category.SanityTests;
import org.grycap.coreutils.test.rules.TestPrinter;
import org.grycap.coreutils.test.rules.TestWatcher2;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -43,6 +39,11 @@ import org.junit.rules.TestRule;
import com.google.common.collect.ImmutableList;
import es.upv.grycap.coreutils.fiber.http.HttpDataFetcher;
import es.upv.grycap.coreutils.test.category.SanityTests;
import es.upv.grycap.coreutils.test.rules.TestPrinter;
import es.upv.grycap.coreutils.test.rules.TestWatcher2;
/**
* Tests fetcher with invalid inputs.
* @author Erik Torres <etserrano@gmail.com>
@@ -21,11 +21,11 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test;
package es.upv.grycap.coreutils.fiber.test;
import static com.google.common.collect.ImmutableList.of;
import static org.grycap.coreutils.fiber.http.Http2Client.getHttp2Client;
import static org.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer.MOCK_SERVER_BASE_URL;
import static es.upv.grycap.coreutils.fiber.http.Http2Client.getHttp2Client;
import static es.upv.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer.MOCK_SERVER_BASE_URL;
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
@@ -34,10 +34,6 @@ import static org.hamcrest.MatcherAssert.assertThat;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import org.grycap.coreutils.fiber.http.Http2Client;
import org.grycap.coreutils.test.category.IntegrationTests;
import org.grycap.coreutils.test.rules.TestPrinter;
import org.grycap.coreutils.test.rules.TestWatcher2;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -47,6 +43,10 @@ import com.squareup.okhttp.Callback;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
import es.upv.grycap.coreutils.fiber.http.Http2Client;
import es.upv.grycap.coreutils.test.category.IntegrationTests;
import es.upv.grycap.coreutils.test.rules.TestPrinter;
import es.upv.grycap.coreutils.test.rules.TestWatcher2;
import net.jodah.concurrentunit.Waiter;
/**
@@ -21,15 +21,15 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test;
package es.upv.grycap.coreutils.fiber.test;
import static com.google.common.collect.ImmutableList.of;
import static com.google.common.collect.Lists.newArrayList;
import static es.upv.grycap.coreutils.fiber.http.Http2Client.getHttp2Client;
import static es.upv.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer.MOCK_SERVER_BASE_URL;
import static es.upv.grycap.coreutils.fiber.test.mockserver.ObjectResponseValidator.isValidJson;
import static es.upv.grycap.coreutils.fiber.test.mockserver.ObjectResponseValidator.isValidXml;
import static java.util.Optional.ofNullable;
import static org.grycap.coreutils.fiber.http.Http2Client.getHttp2Client;
import static org.grycap.coreutils.fiber.test.mockserver.FiberExpectationInitializer.MOCK_SERVER_BASE_URL;
import static org.grycap.coreutils.fiber.test.mockserver.ObjectResponseValidator.isValidJson;
import static org.grycap.coreutils.fiber.test.mockserver.ObjectResponseValidator.isValidXml;
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.not;
@@ -43,10 +43,6 @@ import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.function.Supplier;
import org.grycap.coreutils.fiber.http.Http2Client;
import org.grycap.coreutils.test.category.IntegrationTests;
import org.grycap.coreutils.test.rules.TestPrinter;
import org.grycap.coreutils.test.rules.TestWatcher2;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -60,6 +56,10 @@ import com.squareup.okhttp.Callback;
import com.squareup.okhttp.Request;
import com.squareup.okhttp.Response;
import es.upv.grycap.coreutils.fiber.http.Http2Client;
import es.upv.grycap.coreutils.test.category.IntegrationTests;
import es.upv.grycap.coreutils.test.rules.TestPrinter;
import es.upv.grycap.coreutils.test.rules.TestWatcher2;
import net.jodah.concurrentunit.Waiter;
/**
@@ -21,12 +21,12 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test;
package es.upv.grycap.coreutils.fiber.test;
import static com.google.common.collect.ImmutableMap.of;
import static es.upv.grycap.coreutils.fiber.net.UrlBuilder.getUrlBuilder;
import static java.util.Collections.emptyMap;
import static org.apache.commons.lang3.StringUtils.trim;
import static org.grycap.coreutils.fiber.net.UrlBuilder.getUrlBuilder;
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
@@ -37,10 +37,6 @@ import java.util.Arrays;
import java.util.Collection;
import java.util.Map;
import org.grycap.coreutils.fiber.net.UrlBuilder;
import org.grycap.coreutils.test.category.SanityTests;
import org.grycap.coreutils.test.rules.TestPrinter;
import org.grycap.coreutils.test.rules.TestWatcher2;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
@@ -50,6 +46,11 @@ import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameter;
import org.junit.runners.Parameterized.Parameters;
import es.upv.grycap.coreutils.fiber.net.UrlBuilder;
import es.upv.grycap.coreutils.test.category.SanityTests;
import es.upv.grycap.coreutils.test.rules.TestPrinter;
import es.upv.grycap.coreutils.test.rules.TestWatcher2;
/**
* Tests {@link UrlBuilder}.
* @author Erik Torres <etserrano@gmail.com>
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test.mockserver;
package es.upv.grycap.coreutils.fiber.test.mockserver;
import java.util.List;
import java.util.Map;
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test.mockserver;
package es.upv.grycap.coreutils.fiber.test.mockserver;
import static java.util.Collections.emptyMap;
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test.mockserver;
package es.upv.grycap.coreutils.fiber.test.mockserver;
import static java.util.Collections.emptyMap;
@@ -21,14 +21,14 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test.mockserver;
package es.upv.grycap.coreutils.fiber.test.mockserver;
import static com.google.common.collect.ImmutableMap.of;
import static es.upv.grycap.coreutils.fiber.test.mockserver.ObjectResponseFactory.jsonObject1;
import static es.upv.grycap.coreutils.fiber.test.mockserver.ObjectResponseFactory.jsonObject2;
import static es.upv.grycap.coreutils.fiber.test.mockserver.ObjectResponseFactory.xmlObject1;
import static es.upv.grycap.coreutils.fiber.test.mockserver.ObjectResponseFactory.xmlObject2;
import static java.util.Collections.emptyMap;
import static org.grycap.coreutils.fiber.test.mockserver.ObjectResponseFactory.jsonObject1;
import static org.grycap.coreutils.fiber.test.mockserver.ObjectResponseFactory.jsonObject2;
import static org.grycap.coreutils.fiber.test.mockserver.ObjectResponseFactory.xmlObject1;
import static org.grycap.coreutils.fiber.test.mockserver.ObjectResponseFactory.xmlObject2;
import static org.mockserver.matchers.Times.exactly;
import static org.mockserver.model.HttpRequest.request;
import static org.mockserver.model.HttpResponse.response;
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test.mockserver;
package es.upv.grycap.coreutils.fiber.test.mockserver;
/**
* Creates objects using standard data formats. Despite the format, all objects include a recognizable identifier in the
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.fiber.test.mockserver;
package es.upv.grycap.coreutils.fiber.test.mockserver;
import static java.nio.file.Files.readAllBytes;
import static java.util.Optional.ofNullable;
@@ -35,7 +35,7 @@ that you distribute must include a readable copy of the "NOTICE" text file.
</encoder>
</appender>
<logger name="org.grycap.coreutils" level="TRACE" />
<logger name="es.upv.grycap.coreutils" level="TRACE" />
<root level="INFO">
<appender-ref ref="FILE" />
+5 -5
View File
@@ -25,7 +25,7 @@ that you distribute must include a readable copy of the "NOTICE" text file.
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.grycap.coreutils</groupId>
<groupId>es.upv.grycap.coreutils</groupId>
<artifactId>coreutils</artifactId>
<version>0.1.0</version>
</parent>
@@ -38,14 +38,14 @@ that you distribute must include a readable copy of the "NOTICE" text file.
<dependencies>
<!-- GRyCAP common utilities -->
<dependency>
<groupId>org.grycap.coreutils</groupId>
<groupId>es.upv.grycap.coreutils</groupId>
<artifactId>coreutils-common</artifactId>
<version>${org.grycap.coreutils.version}</version>
<version>${es.upv.grycap.coreutils.version}</version>
</dependency>
<dependency>
<groupId>org.grycap.coreutils</groupId>
<groupId>es.upv.grycap.coreutils</groupId>
<artifactId>coreutils-test</artifactId>
<version>${org.grycap.coreutils.version}</version>
<version>${es.upv.grycap.coreutils.version}</version>
<scope>test</scope>
</dependency>
@@ -21,13 +21,12 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.logging;
package es.upv.grycap.coreutils.logging;
import static java.util.Objects.requireNonNull;
import org.slf4j.Logger;
/**
* Wraps the SLF4J {@link org.slf4j.LoggerFactory}
* @author Erik Torres <etserrano@gmail.com>
@@ -43,7 +42,7 @@ public final class ExtendedLoggerFactory {
* @return A logger named corresponding to the class passed as parameter.
*/
public static Logger getLogger(final Class<?> clazz) {
org.grycap.coreutils.logging.LogManager.getLogManager().init();
es.upv.grycap.coreutils.logging.LogManager.getLogManager().init();
return org.slf4j.LoggerFactory.getLogger(requireNonNull(clazz, "A non-null class expected"));
}
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.logging;
package es.upv.grycap.coreutils.logging;
import static org.slf4j.LoggerFactory.getLogger;
import static org.slf4j.bridge.SLF4JBridgeHandler.install;
@@ -44,11 +44,11 @@ public class LogManager {
private final static AtomicBoolean PRISTINE = new AtomicBoolean(true);
private LogManager() { }
public static LogManager getLogManager() {
return new LogManager();
}
/**
* The logging system is automatically configured when the method {@link LogManager#getLogger(Class)} is called.
* This method is conveniently provided to initialize the logging system before creating any logger with this class.
@@ -21,10 +21,10 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.logging.test;
package es.upv.grycap.coreutils.logging.test;
import static es.upv.grycap.coreutils.logging.LogManager.getLogManager;
import static org.apache.commons.io.FileUtils.deleteQuietly;
import static org.grycap.coreutils.logging.LogManager.getLogManager;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
@@ -33,9 +33,6 @@ import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import org.grycap.coreutils.test.category.FunctionalTests;
import org.grycap.coreutils.test.rules.TestPrinter;
import org.grycap.coreutils.test.rules.TestWatcher2;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Rule;
@@ -46,6 +43,9 @@ import org.slf4j.Logger;
import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.core.util.StatusPrinter;
import es.upv.grycap.coreutils.test.category.FunctionalTests;
import es.upv.grycap.coreutils.test.rules.TestPrinter;
import es.upv.grycap.coreutils.test.rules.TestWatcher2;
/**
* Tests the log manager.
@@ -77,7 +77,7 @@ public class LogManagerTest {
@Test
public void testFactory() throws Exception {
// setup logging via the factory method that internally calls the initialization method
final Logger logger = org.grycap.coreutils.logging.ExtendedLoggerFactory.getLogger(DummyClass.class);
final Logger logger = es.upv.grycap.coreutils.logging.ExtendedLoggerFactory.getLogger(DummyClass.class);
assertThat("Logger is not null", logger, notNullValue());
// j.u.l. logger
@@ -41,7 +41,7 @@ that you distribute must include a readable copy of the "NOTICE" text file.
</encoder>
</appender>
<logger name="org.grycap.coreutils" level="TRACE" />
<logger name="es.upv.grycap.coreutils" level="TRACE" />
<root level="INFO">
<!-- <appender-ref ref="STDOUT" /> -->
+1 -1
View File
@@ -26,7 +26,7 @@ that you distribute must include a readable copy of the "NOTICE" text file.
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.grycap.coreutils</groupId>
<groupId>es.upv.grycap.coreutils</groupId>
<artifactId>coreutils</artifactId>
<version>0.1.0</version>
</parent>
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.test.category;
package es.upv.grycap.coreutils.test.category;
/**
* Categorize unit tests that belongs to the functional testing group.
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.test.category;
package es.upv.grycap.coreutils.test.category;
/**
* Categorize unit tests that belongs to the integration testing group.
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.test.category;
package es.upv.grycap.coreutils.test.category;
/**
* Categorize unit tests that belongs to the sanity testing group.
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.test.rules;
package es.upv.grycap.coreutils.test.rules;
import static java.util.Optional.ofNullable;
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.test.rules;
package es.upv.grycap.coreutils.test.rules;
import static java.util.Optional.ofNullable;
@@ -42,7 +42,7 @@ public class TestWatcher2 extends TestWatcher {
* Default header that will be printed before the status messages.
*/
private static final String DEFAULT_HEADER = " >>> TestUtils >>> ";
/**
* Default footer that will be printed after the status messages.
*/
@@ -21,7 +21,7 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.test.util;
package es.upv.grycap.coreutils.test.util;
import static java.io.File.separator;
import static java.util.Arrays.asList;
@@ -56,7 +56,7 @@ public class ResourceLoadingUtils {
* subdirectories).
*/
public static final String TEST_DIRNAME = "testfiles";
/**
* Finds the directory where the test files are located.
*/
@@ -109,9 +109,9 @@ public class ResourceLoadingUtils {
* @since 0.1.0
*/
public static class ExtensionFilter implements FilenameFilter {
private final List<String> extensions;
/**
* Convenient constructor to initialize the valid file extensions from an array.
* @param extensions - valid file extensions
@@ -119,7 +119,7 @@ public class ResourceLoadingUtils {
public ExtensionFilter(final @Nullable String[] extensions) {
this(asList(ofNullable(extensions).orElse(new String[]{})));
}
/**
* Convenient constructor to initialize the valid file extensions from a list.
* @param extensions - valid file extensions
@@ -129,14 +129,14 @@ public class ResourceLoadingUtils {
.map(e -> e != null ? e.trim().toLowerCase() : null)
.filter(Objects::nonNull).collect(Collectors.toList());
}
@Override
public boolean accept(final File file, final String name) {
final String name2 = (name != null ? name.trim().toLowerCase() : null);
if (name2 == null) return false;
return extensions.stream().anyMatch(e -> name2.endsWith(e));
}
}
}
@@ -21,10 +21,10 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
package org.grycap.coreutils.test;
package es.upv.grycap.coreutils.test;
import static es.upv.grycap.coreutils.test.util.ResourceLoadingUtils.getResourceFiles;
import static java.io.File.separator;
import static org.grycap.coreutils.test.util.ResourceLoadingUtils.getResourceFiles;
import static org.hamcrest.CoreMatchers.allOf;
import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.CoreMatchers.notNullValue;
@@ -34,15 +34,16 @@ import static org.hamcrest.collection.IsEmptyCollection.empty;
import java.util.List;
import org.grycap.coreutils.test.category.FunctionalTests;
import org.grycap.coreutils.test.rules.TestPrinter;
import org.grycap.coreutils.test.rules.TestWatcher2;
import org.grycap.coreutils.test.util.ResourceLoadingUtils;
import org.junit.Rule;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.rules.TestRule;
import es.upv.grycap.coreutils.test.category.FunctionalTests;
import es.upv.grycap.coreutils.test.rules.TestPrinter;
import es.upv.grycap.coreutils.test.rules.TestWatcher2;
import es.upv.grycap.coreutils.test.util.ResourceLoadingUtils;
/**
* Tests resource loading utilities provided by {@link ResourceLoadingUtils}.
* @author Erik Torres <etserrano@gmail.com>
+4 -4
View File
@@ -25,7 +25,7 @@ that you distribute must include a readable copy of the "NOTICE" text file.
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.grycap.coreutils</groupId>
<groupId>es.upv.grycap.coreutils</groupId>
<artifactId>coreutils</artifactId>
<version>0.1.0</version>
<packaging>pom</packaging>
@@ -74,7 +74,7 @@ that you distribute must include a readable copy of the "NOTICE" text file.
<!-- Convenience properties to set library versions -->
<ch.qos.logback.version>1.1.3</ch.qos.logback.version>
<junit.version>4.12</junit.version> <!-- affects Hamcrest version -->
<org.grycap.coreutils.version>${project.version}</org.grycap.coreutils.version>
<es.upv.grycap.coreutils.version>${project.version}</es.upv.grycap.coreutils.version>
<org.hamcrest.version>1.3</org.hamcrest.version> <!-- affected by JUnit version -->
<org.mock-server.version>3.10.2</org.mock-server.version>
<org.slf4j.version>1.7.13</org.slf4j.version>
@@ -262,7 +262,7 @@ that you distribute must include a readable copy of the "NOTICE" text file.
<includes>
<include>**/*Test.java</include>
</includes>
<excludedGroups>org.grycap.coreutils.test.category.IntegrationTests</excludedGroups>
<excludedGroups>es.upv.grycap.coreutils.test.category.IntegrationTests</excludedGroups>
</configuration>
</plugin>
<!-- Maven Failsafe Plugin -->
@@ -290,7 +290,7 @@ that you distribute must include a readable copy of the "NOTICE" text file.
<includes>
<include>**/*Test.java</include>
</includes>
<groups>org.grycap.coreutils.test.category.IntegrationTests</groups>
<groups>es.upv.grycap.coreutils.test.category.IntegrationTests</groups>
</configuration>
</plugin>
<!-- Cobertura: creates code coverage reports -->