You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by ra...@apache.org on 2015/05/22 20:57:48 UTC

deltaspike git commit: DELTASPIKE-902 - Added a test for EntityRepository#removeAndFlush(entity)

Repository: deltaspike
Updated Branches:
  refs/heads/master 334e1c4b6 -> 62c99d28a


DELTASPIKE-902 - Added a test for EntityRepository#removeAndFlush(entity)


Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/62c99d28
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/62c99d28
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/62c99d28

Branch: refs/heads/master
Commit: 62c99d28a9857730eb63535c9d2cbf7da9d1df72
Parents: 334e1c4
Author: Rafael Benevides <ra...@gmail.com>
Authored: Fri May 22 14:57:33 2015 -0400
Committer: Rafael Benevides <ra...@gmail.com>
Committed: Fri May 22 14:57:33 2015 -0400

----------------------------------------------------------------------
 .../data/impl/handler/EntityRepositoryHandlerTest.java | 13 +++++++++++++
 1 file changed, 13 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/62c99d28/deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/impl/handler/EntityRepositoryHandlerTest.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/impl/handler/EntityRepositoryHandlerTest.java b/deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/impl/handler/EntityRepositoryHandlerTest.java
index c0cb69c..831ba77 100644
--- a/deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/impl/handler/EntityRepositoryHandlerTest.java
+++ b/deltaspike/modules/data/impl/src/test/java/org/apache/deltaspike/data/impl/handler/EntityRepositoryHandlerTest.java
@@ -339,6 +339,19 @@ public class EntityRepositoryHandlerTest extends TransactionalTestCase
         assertNull(lookup);
     }
 
+    @Test
+    public void should_remove_and_flush() {
+        // given
+        Simple simple = testData.createSimple("testRemoveAndFlush");
+
+        // when
+        repo.removeAndFlush(simple);
+        Simple lookup = entityManager.find(Simple.class, simple.getId());
+
+        // then
+        assertNull(lookup);
+    }
+
     @Override
     protected EntityManager getEntityManager()
     {