Author: danhaywood
Date: Wed Nov 19 17:15:58 2014
New Revision: 1640602

URL: http://svn.apache.org/r1640602
Log:
tutorial

Modified:
    isis/site/trunk/content/intro/tutorials/apacheconeu-2014.md

Modified: isis/site/trunk/content/intro/tutorials/apacheconeu-2014.md
URL: 
http://svn.apache.org/viewvc/isis/site/trunk/content/intro/tutorials/apacheconeu-2014.md?rev=1640602&r1=1640601&r2=1640602&view=diff
==============================================================================
--- isis/site/trunk/content/intro/tutorials/apacheconeu-2014.md (original)
+++ isis/site/trunk/content/intro/tutorials/apacheconeu-2014.md Wed Nov 19 
17:15:58 2014
@@ -575,56 +575,58 @@ Up to this point we've been introducing 
 
 ### Unit testing
 
-TODO
+Unit testing domain entities and domain services is easy; just use JUnit and 
mocking libraries to mock out interactions with domain services.
 
-unit
-
-http://isis.apache.org/core/unittestsupport.html
+[Mockito](https://code.google.com/p/mockito/) seems to be the current 
favourite among Java developers for mocking libraries, but if you use JMock 
then you'll find we provide a `JUnitRuleMockery2` class and a number of other 
utility classes, documented 
[here](http://isis.apache.org/core/unittestsupport.html).
 
+* write some unit tests (adapt from the unit tests in the `myapp-dom` Maven 
module).
 
 
 ### Integration testing
 
-TODO
-
-http://isis.apache.org/core/integtestsupport.html
+Although unit tests are easy to write and fast to execute, integration tests 
are more valuable: they test interactions of the system from the outside-in, 
simulating the way in which the end-users use the application.
 
-http://isis.apache.org/reference/services/wrapper-factory.html
+Earlier on in the tutorial we commented out the `myapp-integtests` module.  
Let's commented it back in.  In the parent `pom.xml`:
 
+    <modules>
+        <module>dom</module>
+        <module>fixture</module>
+        <!--
+        <module>integtests</module>
+        -->
+        <module>webapp</module>
+    </modules>
 
-reuse the fixture scripts
+change to:
 
+    <modules>
+        <module>dom</module>
+        <module>fixture</module>
+        <module>integtests</module>
+        <module>webapp</module>
+    </modules>
 
+There will probably be some compile issues to fix up once you've done this; 
comment out all code that doesn't compile.
 
-## Customising the REST API
+Isis has great support for writing [integration 
tests](http://isis.apache.org/core/integtestsupport.html); well-written 
integration tests should leverage fixture scripts and use the [wrapper 
factory](http://isis.apache.org/reference/services/wrapper-factory.html) 
service.
 
-TODO
+* use the tests from the original archetype and the documentation on the 
website to develop integration tests for your app's functionality.
 
 
+## Customising the REST API
 
-http://isis.apache.org/components/viewers/restfulobjects/simplified-object-representation.html
+The REST API generated by Isis conforms to the Restful Objects specification.  
Isis 1.8.0-SNAPSHOT provides experimental support to allow the representations 
to be customized.
 
+* as per [these 
docs](http://isis.apache.org/components/viewers/restfulobjects/simplified-object-representation.html),
 configure the Restful Objects viewer to generate a simplified object 
representation:
 
 <pre>
-isis.viewer.restfulobjects.objectPropertyValuesOnly=true
+    isis.viewer.restfulobjects.objectPropertyValuesOnly=true
 </pre>
 
 
-
-
-
-
-
-## Exception Recognizers
-
-
-
-
 ## Configuring to use an external database
 
-TODO
-
-update `persistor.properties`
+If you have an external database available, then update the `pom.xml` for the 
classpath and update the JDBC properties in `WEB-INF\persistor.properties` to 
point to your database.
 
 
 


Reply via email to