You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2012/06/26 23:01:19 UTC
svn commit: r1354230 - in /incubator/isis/trunk/framework:
runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/
tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/
Author: danhaywood
Date: Tue Jun 26 21:01:18 2012
New Revision: 1354230
URL: http://svn.apache.org/viewvc?rev=1354230&view=rev
Log:
ISIS-234: creating failing test case
Added:
incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_persistAggregated.java (with props)
Modified:
incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_persist.java
incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ReferencingEntity.java
Modified: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_persist.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_persist.java?rev=1354230&r1=1354229&r2=1354230&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_persist.java (original)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_persist.java Tue Jun 26 21:01:18 2012
@@ -19,19 +19,41 @@
package org.apache.isis.runtimes.dflt.objectstores.dflt;
+import org.junit.Ignore;
+import org.junit.Rule;
+import org.junit.Test;
+
import org.apache.isis.runtimes.dflt.runtime.installerregistry.installerapi.PersistenceMechanismInstaller;
-import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures.Listener;
-import org.apache.isis.runtimes.dflt.testsupport.tck.ObjectStoreContractTest_persist;
+import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures;
+import org.apache.isis.tck.dom.refs.ReferencingEntity;
+
+public class InMemoryObjectStoreTest_persist {
-public class InMemoryObjectStoreTest_persist extends ObjectStoreContractTest_persist {
+ @Rule
+ public IsisSystemWithFixtures iswf = IsisSystemWithFixtures.builder()
+ .with(createPersistenceMechanismInstaller())
+ .build();
- @Override
protected PersistenceMechanismInstaller createPersistenceMechanismInstaller() {
return new InMemoryPersistenceMechanismInstaller();
}
- @Override
- protected Listener iswfListener() {
- return null;
+ @Ignore("reproducing problem found by Rob")
+ @Test
+ public void persistAggregatedEntityWithinCollection() throws Exception {
+ final ReferencingEntity referencingEntity = iswf.fixtures.rfcg2;
+ referencingEntity.addAggregatedEntityToCollection().setName("Aggregated Entity #1");
+ iswf.persist(referencingEntity);
}
+
+
+ @Ignore("reproducing problem found by Rob")
+ @Test
+ public void persistAggregatedEntityWithinProperty() throws Exception {
+ final ReferencingEntity referencingEntity = iswf.fixtures.rfcg2;
+ referencingEntity.addAggregatedReference().setName("Aggregated Entity #1");
+ iswf.persist(referencingEntity);
+ }
+
+
}
Added: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_persistAggregated.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_persistAggregated.java?rev=1354230&view=auto
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_persistAggregated.java (added)
+++ incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_persistAggregated.java Tue Jun 26 21:01:18 2012
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.isis.runtimes.dflt.objectstores.dflt;
+
+import org.apache.isis.runtimes.dflt.runtime.installerregistry.installerapi.PersistenceMechanismInstaller;
+import org.apache.isis.runtimes.dflt.testsupport.IsisSystemWithFixtures.Listener;
+import org.apache.isis.runtimes.dflt.testsupport.tck.ObjectStoreContractTest_persist;
+
+public class InMemoryObjectStoreTest_persistAggregated extends ObjectStoreContractTest_persist {
+
+ @Override
+ protected PersistenceMechanismInstaller createPersistenceMechanismInstaller() {
+ return new InMemoryPersistenceMechanismInstaller();
+ }
+
+ @Override
+ protected Listener iswfListener() {
+ return null;
+ }
+}
Propchange: incubator/isis/trunk/framework/runtimes/dflt/testsupport/src/test/java/org/apache/isis/runtimes/dflt/objectstores/dflt/InMemoryObjectStoreTest_persistAggregated.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ReferencingEntity.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ReferencingEntity.java?rev=1354230&r1=1354229&r2=1354230&view=diff
==============================================================================
--- incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ReferencingEntity.java (original)
+++ incubator/isis/trunk/framework/tck/tck-dom/src/main/java/org/apache/isis/tck/dom/refs/ReferencingEntity.java Tue Jun 26 21:01:18 2012
@@ -19,6 +19,10 @@
package org.apache.isis.tck.dom.refs;
+import java.util.List;
+
+import com.google.common.collect.Lists;
+
import org.apache.isis.applib.annotation.NotPersisted;
import org.apache.isis.applib.annotation.ObjectType;
@@ -48,6 +52,30 @@ public class ReferencingEntity extends B
public void setAggregatedReference(final AggregatedEntity aggregatedReference) {
this.aggregatedReference = aggregatedReference;
}
+
+ public AggregatedEntity addAggregatedReference() {
+ final AggregatedEntity aggregatedEntity = newAggregatedInstance(AggregatedEntity.class);
+ setAggregatedReference(aggregatedEntity);
+ return aggregatedEntity;
+ }
+ // }}
+
+ // {{ AggregatedEntities
+ private List<AggregatedEntity> aggregatedEntities = Lists.newArrayList();
+
+ public List<AggregatedEntity> getAggregatedEntities() {
+ return aggregatedEntities;
+ }
+
+ public void setAggregatedEntities(List<AggregatedEntity> aggregatedEntities) {
+ this.aggregatedEntities = aggregatedEntities;
+ }
+
+ public AggregatedEntity addAggregatedEntityToCollection() {
+ final AggregatedEntity aggregatedEntity = newAggregatedInstance(AggregatedEntity.class);
+ getAggregatedEntities().add(aggregatedEntity);
+ return aggregatedEntity;
+ }
// }}
// {{ NotPersisted
@@ -57,4 +85,5 @@ public class ReferencingEntity extends B
}
// }}
+
}