Author: buildbot
Date: Wed Nov 19 17:16:06 2014
New Revision: 929793
Log:
Staging update by buildbot for isis
Modified:
websites/staging/isis/trunk/cgi-bin/ (props changed)
websites/staging/isis/trunk/content/ (props changed)
websites/staging/isis/trunk/content/intro/tutorials/apacheconeu-2014.html
Propchange: websites/staging/isis/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Nov 19 17:16:06 2014
@@ -1 +1 @@
-1640579
+1640602
Propchange: websites/staging/isis/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Nov 19 17:16:06 2014
@@ -1 +1 @@
-1640579
+1640602
Modified:
websites/staging/isis/trunk/content/intro/tutorials/apacheconeu-2014.html
==============================================================================
--- websites/staging/isis/trunk/content/intro/tutorials/apacheconeu-2014.html
(original)
+++ websites/staging/isis/trunk/content/intro/tutorials/apacheconeu-2014.html
Wed Nov 19 17:16:06 2014
@@ -1074,39 +1074,63 @@ mvn clean install
<h3>Unit testing</h3>
-<p>TODO</p>
+<p>Unit testing domain entities and domain services is easy; just use JUnit
and mocking libraries to mock out interactions with domain services.</p>
-<p>unit</p>
+<p><a href="https://code.google.com/p/mockito/">Mockito</a> seems to be the
current favourite among Java developers for mocking libraries, but if you use
JMock then you'll find we provide a <code>JUnitRuleMockery2</code> class and a
number of other utility classes, documented <a
href="http://isis.apache.org/core/unittestsupport.html">here</a>.</p>
-<p>http://isis.apache.org/core/unittestsupport.html</p>
+<ul>
+<li>write some unit tests (adapt from the unit tests in the
<code>myapp-dom</code> Maven module).</li>
+</ul>
<h3>Integration testing</h3>
-<p>TODO</p>
+<p>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.</p>
-<p>http://isis.apache.org/core/integtestsupport.html</p>
+<p>Earlier on in the tutorial we commented out the
<code>myapp-integtests</code> module. Let's commented it back in. In the
parent <code>pom.xml</code>:</p>
-<p>http://isis.apache.org/reference/services/wrapper-factory.html</p>
-
-<p>reuse the fixture scripts</p>
+<pre><code><modules>
+ <module>dom</module>
+ <module>fixture</module>
+ <!--
+ <module>integtests</module>
+ -->
+ <module>webapp</module>
+</modules>
+</code></pre>
+
+<p>change to:</p>
+
+<pre><code><modules>
+ <module>dom</module>
+ <module>fixture</module>
+ <module>integtests</module>
+ <module>webapp</module>
+</modules>
+</code></pre>
+
+<p>There will probably be some compile issues to fix up once you've done this;
comment out all code that doesn't compile.</p>
+
+<p>Isis has great support for writing <a
href="http://isis.apache.org/core/integtestsupport.html">integration tests</a>;
well-written integration tests should leverage fixture scripts and use the <a
href="http://isis.apache.org/reference/services/wrapper-factory.html">wrapper
factory</a> service.</p>
+
+<ul>
+<li>use the tests from the original archetype and the documentation on the
website to develop integration tests for your app's functionality.</li>
+</ul>
<h2>Customising the REST API</h2>
-<p>TODO</p>
+<p>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.</p>
-<p>http://isis.apache.org/components/viewers/restfulobjects/simplified-object-representation.html</p>
+<ul>
+<li>as per <a
href="http://isis.apache.org/components/viewers/restfulobjects/simplified-object-representation.html">these
docs</a>, configure the Restful Objects viewer to generate a simplified object
representation:</li>
+</ul>
<pre>
-isis.viewer.restfulobjects.objectPropertyValuesOnly=true
+ isis.viewer.restfulobjects.objectPropertyValuesOnly=true
</pre>
-<h2>Exception Recognizers</h2>
-
<h2>Configuring to use an external database</h2>
-<p>TODO</p>
-
-<p>update <code>persistor.properties</code></p>
+<p>If you have an external database available, then update the
<code>pom.xml</code> for the classpath and update the JDBC properties in
<code>WEB-INF\persistor.properties</code> to point to your database.</p>
<p></div></p>