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 2013/06/07 18:35:28 UTC

svn commit: r1490711 - /isis/site/trunk/content/core/unittestsupport.md

Author: danhaywood
Date: Fri Jun  7 16:35:28 2013
New Revision: 1490711

URL: http://svn.apache.org/r1490711
Log:
isis-428 doc

Modified:
    isis/site/trunk/content/core/unittestsupport.md

Modified: isis/site/trunk/content/core/unittestsupport.md
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/core/unittestsupport.md?rev=1490711&r1=1490710&r2=1490711&view=diff
==============================================================================
--- isis/site/trunk/content/core/unittestsupport.md (original)
+++ isis/site/trunk/content/core/unittestsupport.md Fri Jun  7 16:35:28 2013
@@ -46,7 +46,7 @@ To see what's going on (and to identify 
 
 The example tests can be found [here](https://github.com/apache/isis/tree/master/core/unittestsupport/src/test/java/org/apache/isis/core/unittestsupport/bidir).
 
-##JUnitRuleMockery2
+##JUnitRuleMockery2 (enhanced in [1.3.0-SNAPSHOT])
 
 An extension to the JMock's `JunitRuleMockery`, providing a simpler API and also providing support for autowiring.
 
@@ -63,17 +63,19 @@ For example, here we see that the class 
         @ClassUnderTest
         private CollaboratingUsingSetterInjection collaborating;
     
-        @Before
-        public void setUp() throws Exception {
-        	collaborating = context.getClassUnderTest();
-        }
-        
         @Test
         public void wiring() {
         	assertThat(collaborating.collaborator, is(not(nullValue())));
         }
     }
 
+Prior to 1.3.0-SNAPSHOT, it is necessary to manually lookup the `@ClassUnderTest` instance from the `context`:
+
+        @Before
+        public void setUp() throws Exception {
+        	collaborating = context.getClassUnderTest();
+        }
+
 
 The example tests can be found [here](https://github.com/apache/isis/tree/master/core/unittestsupport/src/test/java/org/apache/isis/core/unittestsupport/jmocking)