polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject [1/2] zest-qi4j git commit: ZEST-55 Rework regressions tests, remove @Ignores, they now pass
Date Fri, 10 Jul 2015 09:34:28 GMT
Repository: zest-qi4j
Updated Branches:
  refs/heads/develop 4076eae35 -> 0079367bc


ZEST-55 Rework regressions tests, remove @Ignores, they now pass


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/141dc5c0
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/141dc5c0
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/141dc5c0

Branch: refs/heads/develop
Commit: 141dc5c0188064cccf3356b66b2822a7bcc157c1
Parents: cccbc92
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Fri Jul 10 11:31:56 2015 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Fri Jul 10 11:31:56 2015 +0200

----------------------------------------------------------------------
 ...faceCollisionWithRelatedReturnTypesTest.java |  2 --
 ...alueCollisionWithRelatedReturnTypesTest.java | 36 +++++++++++++-------
 2 files changed, 24 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/141dc5c0/core/runtime/src/test/java/org/qi4j/regression/qi377/InterfaceCollisionWithRelatedReturnTypesTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/qi4j/regression/qi377/InterfaceCollisionWithRelatedReturnTypesTest.java
b/core/runtime/src/test/java/org/qi4j/regression/qi377/InterfaceCollisionWithRelatedReturnTypesTest.java
index d1741ac..b467a4d 100644
--- a/core/runtime/src/test/java/org/qi4j/regression/qi377/InterfaceCollisionWithRelatedReturnTypesTest.java
+++ b/core/runtime/src/test/java/org/qi4j/regression/qi377/InterfaceCollisionWithRelatedReturnTypesTest.java
@@ -18,7 +18,6 @@
  */
 package org.qi4j.regression.qi377;
 
-import org.junit.Ignore;
 import org.junit.Test;
 import org.qi4j.api.association.Association;
 import org.qi4j.api.association.ManyAssociation;
@@ -36,7 +35,6 @@ import static org.hamcrest.core.IsEqual.equalTo;
 import static org.hamcrest.core.IsNull.notNullValue;
 import static org.junit.Assert.assertThat;
 
-@Ignore( "This test exhibit QI-377" )
 public class InterfaceCollisionWithRelatedReturnTypesTest
     extends AbstractQi4jTest
 {

http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/141dc5c0/core/runtime/src/test/java/org/qi4j/regression/qi377/ValueCollisionWithRelatedReturnTypesTest.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/test/java/org/qi4j/regression/qi377/ValueCollisionWithRelatedReturnTypesTest.java
b/core/runtime/src/test/java/org/qi4j/regression/qi377/ValueCollisionWithRelatedReturnTypesTest.java
index 20eb70f..ea232c1 100644
--- a/core/runtime/src/test/java/org/qi4j/regression/qi377/ValueCollisionWithRelatedReturnTypesTest.java
+++ b/core/runtime/src/test/java/org/qi4j/regression/qi377/ValueCollisionWithRelatedReturnTypesTest.java
@@ -18,21 +18,20 @@
  */
 package org.qi4j.regression.qi377;
 
-import org.junit.Ignore;
 import org.junit.Test;
+import org.qi4j.api.entity.Identity;
 import org.qi4j.api.association.Association;
 import org.qi4j.api.association.ManyAssociation;
 import org.qi4j.api.common.Optional;
 import org.qi4j.api.property.Property;
+import org.qi4j.api.value.ValueBuilder;
 import org.qi4j.bootstrap.AssemblyException;
 import org.qi4j.bootstrap.ModuleAssembly;
 import org.qi4j.test.AbstractQi4jTest;
 
-@Ignore( "This test exhibit QI-377" )
 public class ValueCollisionWithRelatedReturnTypesTest
     extends AbstractQi4jTest
 {
-
     @Override
     public void assemble( ModuleAssembly module )
         throws AssemblyException
@@ -43,15 +42,18 @@ public class ValueCollisionWithRelatedReturnTypesTest
     @Test
     public void shouldBeAbleToSetNameToTheCompany()
     {
-        Company startUp = module.newValue( Company.class );
-        startUp.name().set( "Acme" );
+        ValueBuilder<Company> builder = module.newValueBuilder( Company.class );
+        builder.prototype().name().set( "Acme" );
+        Company startUp = builder.newInstance();
     }
 
     @Test
     public void shouldBeAbleToSetLeadToTheCompany()
     {
         Company startUp = module.newValue( Company.class );
-        Employee niclas = module.newValue( Employee.class );
+        ValueBuilder<Employee> builder = module.newValueBuilder( Employee.class );
+        builder.prototype().identity().set( "niclas" );
+        Employee niclas = builder.newInstance();
         startUp.lead().set( niclas );
     }
 
@@ -59,7 +61,9 @@ public class ValueCollisionWithRelatedReturnTypesTest
     public void shouldBeAbleToSetLeadToTheSalesTeam()
     {
         SalesTeam startUp = module.newValue( SalesTeam.class );
-        Employee niclas = module.newValue( Employee.class );
+        ValueBuilder<Employee> builder = module.newValueBuilder( Employee.class );
+        builder.prototype().identity().set( "niclas" );
+        Employee niclas = builder.newInstance();
         startUp.lead().set( niclas );
     }
 
@@ -67,7 +71,9 @@ public class ValueCollisionWithRelatedReturnTypesTest
     public void shouldBeAbleToSetLeadToTheResearchTeam()
     {
         ResearchTeam startUp = module.newValue( ResearchTeam.class );
-        Employee niclas = module.newValue( Employee.class );
+        ValueBuilder<Employee> builder = module.newValueBuilder( Employee.class );
+        builder.prototype().identity().set( "niclas" );
+        Employee niclas = builder.newInstance();
         startUp.lead().set( niclas );
     }
 
@@ -75,7 +81,9 @@ public class ValueCollisionWithRelatedReturnTypesTest
     public void shouldBeAbleToAddEmployeesToTheCompany()
     {
         Company startUp = module.newValue( Company.class );
-        Employee niclas = module.newValue( Employee.class );
+        ValueBuilder<Employee> builder = module.newValueBuilder( Employee.class );
+        builder.prototype().identity().set( "niclas" );
+        Employee niclas = builder.newInstance();
         startUp.employees().add( niclas );
     }
 
@@ -83,7 +91,9 @@ public class ValueCollisionWithRelatedReturnTypesTest
     public void shouldBeAbleToAddEmployeesToTheSalesTeam()
     {
         SalesTeam startUp = module.newValue( SalesTeam.class );
-        Employee niclas = module.newValue( Employee.class );
+        ValueBuilder<Employee> builder = module.newValueBuilder( Employee.class );
+        builder.prototype().identity().set( "niclas" );
+        Employee niclas = builder.newInstance();
         startUp.employees().add( niclas );
     }
 
@@ -91,11 +101,14 @@ public class ValueCollisionWithRelatedReturnTypesTest
     public void shouldBeAbleToAddEmployeesToTheResearchTeam()
     {
         ResearchTeam startUp = module.newValue( ResearchTeam.class );
-        Employee niclas = module.newValue( Employee.class );
+        ValueBuilder<Employee> builder = module.newValueBuilder( Employee.class );
+        builder.prototype().identity().set( "niclas" );
+        Employee niclas = builder.newInstance();
         startUp.employees().add( niclas );
     }
 
     public interface Employee
+        extends Identity
     {
     }
 
@@ -128,5 +141,4 @@ public class ValueCollisionWithRelatedReturnTypesTest
         extends SalesTeam, ResearchTeam
     {
     }
-
 }


Mime
View raw message