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 2014/05/02 15:28:15 UTC
[2/3] git commit: ISIS-760: fix for integration test of Memento.
ISIS-760: fix for integration test of Memento.
Project: http://git-wip-us.apache.org/repos/asf/isis/repo
Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/0e82db15
Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/0e82db15
Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/0e82db15
Branch: refs/heads/master
Commit: 0e82db154ceaf396171bfb7b67fb7b7f7e350ac7
Parents: 313faf7
Author: Dan Haywood <da...@haywood-associates.co.uk>
Authored: Fri May 2 14:21:52 2014 +0100
Committer: Dan Haywood <da...@haywood-associates.co.uk>
Committed: Fri May 2 14:21:52 2014 +0100
----------------------------------------------------------------------
.../org/apache/isis/core/runtime/memento/MementoTest.java | 9 +++++++++
1 file changed, 9 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/isis/blob/0e82db15/core/integtestsupport/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java
----------------------------------------------------------------------
diff --git a/core/integtestsupport/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java b/core/integtestsupport/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java
index 2dcbf79..6787e43 100644
--- a/core/integtestsupport/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java
+++ b/core/integtestsupport/src/test/java/org/apache/isis/core/runtime/memento/MementoTest.java
@@ -32,6 +32,7 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.List;
+import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
@@ -41,6 +42,7 @@ import org.apache.isis.core.commons.encoding.DataOutputStreamExtended;
import org.apache.isis.core.integtestsupport.IsisSystemWithFixtures;
import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
import org.apache.isis.core.metamodel.spec.ObjectSpecification;
+import org.apache.isis.core.runtime.system.context.IsisContext;
import org.apache.isis.core.tck.dom.refs.BaseEntity;
import org.apache.isis.core.tck.dom.refs.ParentEntity;
import org.apache.isis.core.tck.dom.refs.ReferencingEntity;
@@ -111,9 +113,16 @@ public class MementoTest {
mementoForEpv1 = fromBytes(bytesForEpv1);
mementoForEpr1 = fromBytes(bytesForEpr1);
mementoForEpc1 = fromBytes(bytesForEpc1);
+
+ IsisContext.getTransactionManager().startTransaction();
}
+ @After
+ public void tearDown() throws Exception {
+ IsisContext.getTransactionManager().endTransaction();
+ }
+
private Memento fromBytes(final byte[] bytes) throws IOException {
bais = new ByteArrayInputStream(bytes);
DataInputStreamExtended input = new DataInputStreamExtended(bais);