Commit 1de6246280ce98592aa0458552dfad27aa6c3cda
1 parent
dfac7827
Exists in
master
Recolocação de testes do DelegateCrud
Showing
1 changed file
with
4 additions
and
2 deletions
Show diff stats
impl/core/src/test/java/br/gov/frameworkdemoiselle/template/DelegateCrudTest.java
@@ -56,7 +56,7 @@ import org.powermock.reflect.Whitebox; | @@ -56,7 +56,7 @@ import org.powermock.reflect.Whitebox; | ||
56 | 56 | ||
57 | import br.gov.frameworkdemoiselle.util.Beans; | 57 | import br.gov.frameworkdemoiselle.util.Beans; |
58 | import br.gov.frameworkdemoiselle.util.Reflections; | 58 | import br.gov.frameworkdemoiselle.util.Reflections; |
59 | -@Ignore | 59 | +//@Ignore |
60 | @RunWith(PowerMockRunner.class) | 60 | @RunWith(PowerMockRunner.class) |
61 | @PrepareForTest({ Crud.class, Beans.class, Reflections.class }) | 61 | @PrepareForTest({ Crud.class, Beans.class, Reflections.class }) |
62 | public class DelegateCrudTest { | 62 | public class DelegateCrudTest { |
@@ -79,7 +79,7 @@ public class DelegateCrudTest { | @@ -79,7 +79,7 @@ public class DelegateCrudTest { | ||
79 | mockStatic(Reflections.class); | 79 | mockStatic(Reflections.class); |
80 | 80 | ||
81 | expect(Reflections.getGenericTypeArgument(EasyMock.anyObject(Class.class), EasyMock.anyInt())).andReturn(null); | 81 | expect(Reflections.getGenericTypeArgument(EasyMock.anyObject(Class.class), EasyMock.anyInt())).andReturn(null); |
82 | - expect(Beans.getReference(EasyMock.anyObject(Class.class))).andReturn(mockCrud); | 82 | + expect(Beans.getReference(EasyMock.anyObject(Class.class))).andReturn(mockCrud).times(2); |
83 | 83 | ||
84 | mockCrud.delete(1L); | 84 | mockCrud.delete(1L); |
85 | PowerMock.expectLastCall(); | 85 | PowerMock.expectLastCall(); |
@@ -91,6 +91,7 @@ public class DelegateCrudTest { | @@ -91,6 +91,7 @@ public class DelegateCrudTest { | ||
91 | PowerMock.verify(); | 91 | PowerMock.verify(); |
92 | } | 92 | } |
93 | 93 | ||
94 | + @Ignore | ||
94 | @Test | 95 | @Test |
95 | public void testUpdate() { | 96 | public void testUpdate() { |
96 | Whitebox.setInternalState(delegateCrud, "delegate", mockCrud); | 97 | Whitebox.setInternalState(delegateCrud, "delegate", mockCrud); |
@@ -104,6 +105,7 @@ public class DelegateCrudTest { | @@ -104,6 +105,7 @@ public class DelegateCrudTest { | ||
104 | verifyAll(); | 105 | verifyAll(); |
105 | } | 106 | } |
106 | 107 | ||
108 | + @Ignore | ||
107 | @Test | 109 | @Test |
108 | public void testInsert() { | 110 | public void testInsert() { |
109 | Whitebox.setInternalState(delegateCrud, "delegate", mockCrud); | 111 | Whitebox.setInternalState(delegateCrud, "delegate", mockCrud); |