You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tamaya.apache.org by pl...@apache.org on 2017/09/16 13:35:38 UTC
[1/2] incubator-tamaya git commit: Set required coverage for testing
to 1%.
Repository: incubator-tamaya
Updated Branches:
refs/heads/tamaya-289 5080c04e3 -> 966900e72
Set required coverage for testing to 1%.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/7e63b956
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/7e63b956
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/7e63b956
Branch: refs/heads/tamaya-289
Commit: 7e63b956999b39ca7aa77b35857d53b2e51ec36f
Parents: 5080c04
Author: Oliver B. Fischer <pl...@apache.org>
Authored: Sat Sep 16 15:21:56 2017 +0200
Committer: Oliver B. Fischer <pl...@apache.org>
Committed: Sat Sep 16 15:21:56 2017 +0200
----------------------------------------------------------------------
pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/7e63b956/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 05de4bb..6929e67 100644
--- a/pom.xml
+++ b/pom.xml
@@ -302,7 +302,7 @@
<artifactId>pitest-maven</artifactId>
<version>${pitest-plugin.version}</version>
<configuration>
- <coverageThreshold>50</coverageThreshold>
+ <coverageThreshold>01</coverageThreshold>
<timestampedReports>false</timestampedReports>
<targetClasses>
<param>org.apache.tamaya.*</param>
[2/2] incubator-tamaya git commit: .
Posted by pl...@apache.org.
.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/966900e7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/966900e7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/966900e7
Branch: refs/heads/tamaya-289
Commit: 966900e724d4a443fdfe90cbfec9049ee3c09db2
Parents: 7e63b95
Author: Oliver B. Fischer <pl...@apache.org>
Authored: Sat Sep 16 15:35:30 2017 +0200
Committer: Oliver B. Fischer <pl...@apache.org>
Committed: Sat Sep 16 15:35:30 2017 +0200
----------------------------------------------------------------------
.../org/apache/tamaya/ConfigExceptionTest.java | 4 ++--
.../org/apache/tamaya/ConfigurationTest.java | 10 ++++-----
.../java/org/apache/tamaya/TypeLiteralTest.java | 18 ++++++++--------
.../tamaya/core/internal/BannerManagerTest.java | 2 +-
.../DefaultConfigurationContextTest.java | 16 +++++++-------
.../internal/DefaultServiceContextTest.java | 6 +++---
.../converters/DoubleConverterTest.java | 22 ++++++++++----------
.../propertysource/BasePropertySourceTest.java | 4 ++--
8 files changed, 41 insertions(+), 41 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/966900e7/code/api/src/test/java/org/apache/tamaya/ConfigExceptionTest.java
----------------------------------------------------------------------
diff --git a/code/api/src/test/java/org/apache/tamaya/ConfigExceptionTest.java b/code/api/src/test/java/org/apache/tamaya/ConfigExceptionTest.java
index 8cb7df6..0cd344f 100644
--- a/code/api/src/test/java/org/apache/tamaya/ConfigExceptionTest.java
+++ b/code/api/src/test/java/org/apache/tamaya/ConfigExceptionTest.java
@@ -28,14 +28,14 @@ import static org.junit.Assert.*;
*/
public class ConfigExceptionTest {
- @Test @Ignore
+ @Test
public void testCreationMessage(){
ConfigException ex = new ConfigException("test");
assertNull(ex.getCause());
assertEquals(ex.getMessage(), "test");
}
- @Test @Ignore
+ @Test
public void testCreationMessageThrowable(){
Exception e = new IllegalStateException("blabla");
ConfigException ex = new ConfigException("test", e);
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/966900e7/code/api/src/test/java/org/apache/tamaya/ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/code/api/src/test/java/org/apache/tamaya/ConfigurationTest.java b/code/api/src/test/java/org/apache/tamaya/ConfigurationTest.java
index 433ac87..d618374 100644
--- a/code/api/src/test/java/org/apache/tamaya/ConfigurationTest.java
+++ b/code/api/src/test/java/org/apache/tamaya/ConfigurationTest.java
@@ -28,7 +28,7 @@ import static org.junit.Assert.*;
*/
public class ConfigurationTest {
- @Test @Ignore
+ @Test
public void testget() throws Exception {
assertEquals(Boolean.TRUE, ConfigurationProvider.getConfiguration().get("booleanTrue", Boolean.class));
assertEquals(Boolean.FALSE, ConfigurationProvider.getConfiguration().get("booleanFalse", Boolean.class));
@@ -39,24 +39,24 @@ public class ConfigurationTest {
assertEquals(Double.MAX_VALUE, ConfigurationProvider.getConfiguration().get("double", Double.class), 0.0d);
}
- @Test @Ignore
+ @Test
public void testGetBoolean() throws Exception {
assertTrue(ConfigurationProvider.getConfiguration().get("booleanTrue", Boolean.class));
assertFalse(ConfigurationProvider.getConfiguration().get("booleanFalse", Boolean.class));
assertFalse(ConfigurationProvider.getConfiguration().get("foorBar", Boolean.class));
}
- @Test @Ignore
+ @Test
public void testGetInteger() throws Exception {
assertEquals(Integer.MAX_VALUE,(int) ConfigurationProvider.getConfiguration().get("int", Integer.class));
}
- @Test @Ignore
+ @Test
public void testGetLong() throws Exception {
assertEquals(Long.MAX_VALUE,(long) ConfigurationProvider.getConfiguration().get("long", Long.class));
}
- @Test @Ignore
+ @Test
public void testGetDouble() throws Exception {
assertEquals(Double.MAX_VALUE,ConfigurationProvider.getConfiguration().get("double", Double.class), 0.0d);
}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/966900e7/code/api/src/test/java/org/apache/tamaya/TypeLiteralTest.java
----------------------------------------------------------------------
diff --git a/code/api/src/test/java/org/apache/tamaya/TypeLiteralTest.java b/code/api/src/test/java/org/apache/tamaya/TypeLiteralTest.java
index 90d4484..18a19cb 100644
--- a/code/api/src/test/java/org/apache/tamaya/TypeLiteralTest.java
+++ b/code/api/src/test/java/org/apache/tamaya/TypeLiteralTest.java
@@ -35,19 +35,19 @@ import static org.junit.Assert.assertEquals;
*/
public class TypeLiteralTest {
- @Test(expected = NullPointerException.class) @Ignore
+ @Test(expected = NullPointerException.class)
public void constructorRequiresNonNullParameter() {
new TypeLiteral<List<String>>(null){};
}
- @Test @Ignore
+ @Test
public void test_constrcutor(){
TypeLiteral<List<String>> listTypeLiteral = new TypeLiteral<List<String>>(){};
assertEquals(List.class, listTypeLiteral.getRawType());
assertEquals(String.class, TypeLiteral.getTypeParameters(listTypeLiteral.getType())[0]);
}
- @Test @Ignore
+ @Test
public void test_of(){
class MyListClass extends ArrayList<String>{}
TypeLiteral<MyListClass> listTypeLiteral = TypeLiteral.of(MyListClass.class);
@@ -55,35 +55,35 @@ public class TypeLiteralTest {
assertEquals(MyListClass.class, listTypeLiteral.getType());
}
- @Test(expected = NullPointerException.class) @Ignore
+ @Test(expected = NullPointerException.class)
public void ofDoesNotAcceptNullAsParamter() {
TypeLiteral.of(null);
}
- @Test @Ignore
+ @Test
public void test_getTypeParameter(){
TypeLiteral<List<String>> listTypeLiteral = new TypeLiteral<List<String>>(){};
assertEquals(List.class, listTypeLiteral.getRawType());
assertEquals(String.class, TypeLiteral.getTypeParameters(listTypeLiteral.getType())[0]);
}
- @Test @Ignore
+ @Test
public void test_getGenericInterfaceTypeParameter(){
class MyListClass extends ArrayList<String> implements List<String>{}
assertEquals(String.class, getGenericInterfaceTypeParameters(MyListClass.class, List.class)[0]);
}
- @Test(expected = NullPointerException.class) @Ignore
+ @Test(expected = NullPointerException.class)
public void getGenericInterfaceTypeParametersRequiredNonNullValueForClassParameter() {
getGenericInterfaceTypeParameters(null, Iterator.class);
}
- @Test(expected = NullPointerException.class) @Ignore
+ @Test(expected = NullPointerException.class)
public void getGenericInterfaceTypeParametersRequiredNonNullValueForInterfaceParameter() {
getGenericInterfaceTypeParameters(String.class, null);
}
- @Test(expected = NullPointerException.class) @Ignore
+ @Test(expected = NullPointerException.class)
public void getTypeParametersRequiresNonNullParameter() {
getTypeParameters(null);
}
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/966900e7/code/core/src/test/java/org/apache/tamaya/core/internal/BannerManagerTest.java
----------------------------------------------------------------------
diff --git a/code/core/src/test/java/org/apache/tamaya/core/internal/BannerManagerTest.java b/code/core/src/test/java/org/apache/tamaya/core/internal/BannerManagerTest.java
index fe8d8cc..c38effe 100644
--- a/code/core/src/test/java/org/apache/tamaya/core/internal/BannerManagerTest.java
+++ b/code/core/src/test/java/org/apache/tamaya/core/internal/BannerManagerTest.java
@@ -62,7 +62,7 @@ public class BannerManagerTest {
Mockito.verify(printStream, Mockito.atLeastOnce()).println(Mockito.anyString());
}
- @Test @Ignore
+ @Test
public void invalidValueAvoidsLoggingToConsonle() {
PrintStream standard = System.out;
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/966900e7/code/core/src/test/java/org/apache/tamaya/core/internal/DefaultConfigurationContextTest.java
----------------------------------------------------------------------
diff --git a/code/core/src/test/java/org/apache/tamaya/core/internal/DefaultConfigurationContextTest.java b/code/core/src/test/java/org/apache/tamaya/core/internal/DefaultConfigurationContextTest.java
index 601d832..d5c4a7c 100644
--- a/code/core/src/test/java/org/apache/tamaya/core/internal/DefaultConfigurationContextTest.java
+++ b/code/core/src/test/java/org/apache/tamaya/core/internal/DefaultConfigurationContextTest.java
@@ -32,7 +32,7 @@ import static org.junit.Assert.*;
*/
public class DefaultConfigurationContextTest {
- @Test @Ignore
+ @Test
public void addPropertySources() throws Exception {
ConfigurationContext ctx = new DefaultConfigurationContextBuilder().build();
TestPropertyDefaultSource def = new TestPropertyDefaultSource();
@@ -41,12 +41,12 @@ public class DefaultConfigurationContextTest {
assertTrue(ctx.getPropertySources().contains(def));
}
- @Test @Ignore
+ @Test
public void testToString() throws Exception {
String toString = ConfigurationProvider.getConfiguration().getContext().toString();
}
- @Test @Ignore
+ @Test
public void getPropertySources() throws Exception {
ConfigurationContext ctx = new DefaultConfigurationContextBuilder().build();
assertNotNull(ctx.getPropertySources());
@@ -56,7 +56,7 @@ public class DefaultConfigurationContextTest {
assertEquals(7, ctx.getPropertySources().size());
}
- @Test @Ignore
+ @Test
public void getPropertySource() throws Exception {
TestPropertyDefaultSource ps = new TestPropertyDefaultSource();
ConfigurationContext ctx = new DefaultConfigurationContextBuilder()
@@ -69,7 +69,7 @@ public class DefaultConfigurationContextTest {
}
- @Test @Ignore
+ @Test
public void testHashCode() throws Exception {
TestPropertyDefaultSource ps = new TestPropertyDefaultSource();
ConfigurationContext ctx1 = new DefaultConfigurationContextBuilder()
@@ -83,7 +83,7 @@ public class DefaultConfigurationContextTest {
}
- @Test @Ignore
+ @Test
public void addPropertyConverter() throws Exception {
ConfigurationContext ctx = new DefaultConfigurationContextBuilder().build();
PropertyConverter testConverter = new PropertyConverter() {
@@ -97,7 +97,7 @@ public class DefaultConfigurationContextTest {
assertTrue(ctx.getPropertyConverters(TypeLiteral.of(String.class)).contains(testConverter));
}
- @Test @Ignore
+ @Test
public void getPropertyConverters() throws Exception {
ConfigurationContext ctx = new DefaultConfigurationContextBuilder().build();
PropertyConverter testConverter = new PropertyConverter() {
@@ -121,7 +121,7 @@ public class DefaultConfigurationContextTest {
assertTrue(ctx.getPropertyConverters().get(TypeLiteral.of(Integer.class)).contains(testConverter));
}
- @Test @Ignore
+ @Test
public void getPropertyConverters1() throws Exception {
ConfigurationContext ctx = new DefaultConfigurationContextBuilder().build();
PropertyConverter testConverter = new PropertyConverter() {
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/966900e7/code/core/src/test/java/org/apache/tamaya/core/internal/DefaultServiceContextTest.java
----------------------------------------------------------------------
diff --git a/code/core/src/test/java/org/apache/tamaya/core/internal/DefaultServiceContextTest.java b/code/core/src/test/java/org/apache/tamaya/core/internal/DefaultServiceContextTest.java
index 70c1352..19f5f36 100644
--- a/code/core/src/test/java/org/apache/tamaya/core/internal/DefaultServiceContextTest.java
+++ b/code/core/src/test/java/org/apache/tamaya/core/internal/DefaultServiceContextTest.java
@@ -48,7 +48,7 @@ public class DefaultServiceContextTest {
context.getService(InvalidPriorityInterface.class);
}
- @Test @Ignore
+ @Test
public void testGetService_multipleService_shouldReturnServiceWithHighestPriority() {
MultiImplsInterface service = context.getService(MultiImplsInterface.class);
@@ -56,7 +56,7 @@ public class DefaultServiceContextTest {
Assert.assertTrue(service instanceof MultiImpl2);
}
- @Test @Ignore
+ @Test
public void testGetService_noImpl_shouldReturnEmptyOpional() {
NoImplInterface service = context.getService(NoImplInterface.class);
Assert.assertNull(service);
@@ -86,7 +86,7 @@ public class DefaultServiceContextTest {
}
}
- @Test @Ignore
+ @Test
public void testGetServices_redundantAccessToServices() {
for(int i=0;i<10;i++){
Collection<InvalidPriorityInterface> services = context.getServices(InvalidPriorityInterface.class);
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/966900e7/code/core/src/test/java/org/apache/tamaya/core/internal/converters/DoubleConverterTest.java
----------------------------------------------------------------------
diff --git a/code/core/src/test/java/org/apache/tamaya/core/internal/converters/DoubleConverterTest.java b/code/core/src/test/java/org/apache/tamaya/core/internal/converters/DoubleConverterTest.java
index f50260a..fc25f2a 100644
--- a/code/core/src/test/java/org/apache/tamaya/core/internal/converters/DoubleConverterTest.java
+++ b/code/core/src/test/java/org/apache/tamaya/core/internal/converters/DoubleConverterTest.java
@@ -36,7 +36,7 @@ public class DoubleConverterTest {
* {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testConvert_Double_Decimal() throws Exception {
Configuration config = ConfigurationProvider.getConfiguration();
Double valueRead = config.get("tests.converter.double.decimal", Double.class);
@@ -49,7 +49,7 @@ public class DoubleConverterTest {
* {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testConvert_Double_DecimalNegative() throws Exception {
Configuration config = ConfigurationProvider.getConfiguration();
Double valueRead = config.get("tests.converter.double.decimalNegative", Double.class);
@@ -62,7 +62,7 @@ public class DoubleConverterTest {
* {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testConvert_Double_Integer() throws Exception {
Configuration config = ConfigurationProvider.getConfiguration();
Double valueRead = config.get("tests.converter.double.integer", Double.class);
@@ -75,7 +75,7 @@ public class DoubleConverterTest {
* {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testConvert_Double_Hex1() throws Exception {
Configuration config = ConfigurationProvider.getConfiguration();
Double valueRead = config.get("tests.converter.double.hex1", Double.class);
@@ -88,7 +88,7 @@ public class DoubleConverterTest {
* {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testConvert_Double_Hex2() throws Exception {
Configuration config = ConfigurationProvider.getConfiguration();
Double valueRead = config.get("tests.converter.double.hex2", Double.class);
@@ -101,7 +101,7 @@ public class DoubleConverterTest {
* {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testConvert_Double_Hex3() throws Exception {
Configuration config = ConfigurationProvider.getConfiguration();
Double valueRead = config.get("tests.converter.double.hex3", Double.class);
@@ -113,7 +113,7 @@ public class DoubleConverterTest {
* {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testConvert_Double_MinValue() throws Exception {
Configuration config = ConfigurationProvider.getConfiguration();
Double valueRead = config.get("tests.converter.double.min", Double.class);
@@ -126,7 +126,7 @@ public class DoubleConverterTest {
* {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testConvert_Double_MaxValue() throws Exception {
Configuration config = ConfigurationProvider.getConfiguration();
Double valueRead = config.get("tests.converter.double.max", Double.class);
@@ -139,7 +139,7 @@ public class DoubleConverterTest {
* {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testConvert_Double_NaNValue() throws Exception {
Configuration config = ConfigurationProvider.getConfiguration();
Double valueRead = config.get("tests.converter.double.nan", Double.class);
@@ -152,7 +152,7 @@ public class DoubleConverterTest {
* {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testConvert_Double_PositiveInfinityValue() throws Exception {
Configuration config = ConfigurationProvider.getConfiguration();
Double valueRead = config.get("tests.converter.double.pi", Double.class);
@@ -165,7 +165,7 @@ public class DoubleConverterTest {
* {@link org.apache.tamaya.core.internal.converters.ConverterTestsPropertySource}.
* @throws Exception
*/
- @Test @Ignore
+ @Test
public void testConvert_Double_NegativeInfinityValue() throws Exception {
Configuration config = ConfigurationProvider.getConfiguration();
Double valueRead = config.get("tests.converter.double.ni", Double.class);
http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/966900e7/code/core/src/test/java/org/apache/tamaya/core/propertysource/BasePropertySourceTest.java
----------------------------------------------------------------------
diff --git a/code/core/src/test/java/org/apache/tamaya/core/propertysource/BasePropertySourceTest.java b/code/core/src/test/java/org/apache/tamaya/core/propertysource/BasePropertySourceTest.java
index f5839cf..d628a2d 100644
--- a/code/core/src/test/java/org/apache/tamaya/core/propertysource/BasePropertySourceTest.java
+++ b/code/core/src/test/java/org/apache/tamaya/core/propertysource/BasePropertySourceTest.java
@@ -29,7 +29,7 @@ import java.util.*;
public class BasePropertySourceTest {
- @Test @Ignore
+ @Test
public void testGetOrdinal() {
PropertySource defaultPropertySource = new BasePropertySource(56) {
@@ -57,7 +57,7 @@ public class BasePropertySourceTest {
Assert.assertEquals(1, new OverriddenInvalidOrdinalPropertySource().getOrdinal());
}
- @Test @Ignore
+ @Test
public void testGet() {
Assert.assertEquals(1000, new OverriddenOrdinalPropertySource().getOrdinal());
}