You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by bu...@apache.org on 2013/06/06 12:16:18 UTC
svn commit: r864635 - in /websites/staging/isis/trunk: cgi-bin/ content/
content/components/security/about.html
content/contributors/release-process.html content/core/unittestsupport.html
content/getting-started/resources/isis-templates.xml
Author: buildbot
Date: Thu Jun 6 10:16:18 2013
New Revision: 864635
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/components/security/about.html
websites/staging/isis/trunk/content/contributors/release-process.html
websites/staging/isis/trunk/content/core/unittestsupport.html
websites/staging/isis/trunk/content/getting-started/resources/isis-templates.xml
Propchange: websites/staging/isis/trunk/cgi-bin/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Jun 6 10:16:18 2013
@@ -1 +1 @@
-1488056
+1490226
Propchange: websites/staging/isis/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Jun 6 10:16:18 2013
@@ -1 +1 @@
-1488056
+1490226
Modified: websites/staging/isis/trunk/content/components/security/about.html
==============================================================================
--- websites/staging/isis/trunk/content/components/security/about.html (original)
+++ websites/staging/isis/trunk/content/components/security/about.html Thu Jun 6 10:16:18 2013
@@ -253,10 +253,8 @@
</div>
<ul>
-<li><a href="file/about.html">File-based Security</a></li>
<li><a href="shiro/about.html">Shiro Security</a></li>
-<li><a href="ldap/about.html">LDAP Security</a></li>
-<li><a href="sql/about.html">SQL Security</a></li>
+<li><a href="file/about.html">File-based Security</a></li>
</ul>
Modified: websites/staging/isis/trunk/content/contributors/release-process.html
==============================================================================
--- websites/staging/isis/trunk/content/contributors/release-process.html (original)
+++ websites/staging/isis/trunk/content/contributors/release-process.html Thu Jun 6 10:16:18 2013
@@ -1197,23 +1197,36 @@ TODO: some sort of process required here
<p>And use the following body (summarizing the main points as required):</p>
<pre>
-The Isis team is pleased to announce the release of
-Apache Isis Core version 1.2.3
+The Isis team is pleased to announce the release of:
+- Apache Isis Core version 1.2.0
+- Wicket Viewer 1.2.0
+- Restful Objects Viewer 2.0.0
+- JDO Object Store 1.1.0
+- Shiro Security 1.1.1
+- File Security 1.0.1
+- Quickstart Archetype 1.0.3
-<i>summary of the main points of the release</i>
+New features in this release include:
+- ...
-Full release notes are available at [1] on the Isis website.
+Full release notes are available at [1,2,3,4,5,6,7] on the Isis website.
-You can access this release directly from the Maven central repo [2],
-or download the release and build it from source [3].
+You can access this release directly from the Maven central repo [8],
+or download the release and build it from source [9].
Enjoy!
-The Isis team
-[1] http://isis.apache.org/core/release-notes/isis-1.2.3.html
-[2] http://search.maven.org
-[3] http://isis.apache.org/download.html
+[1] http://isis.apache.org/core/release-notes/isis-1.2.0.html
+[2] http://isis.apache.org/components/viewers/wicket/release-notes/isis-viewer-wicket-1.2.0.html
+[3] http://isis.apache.org/components/viewers/restfulobjects/release-notes/isis-viewer-restfulobjects-2.0.0.html
+[4] http://isis.apache.org/components/objectstores/jdo/release-notes/isis-objectstore-jdo-1.1.0.html
+[5] http://isis.apache.org/components/security/shiro/release-notes/isis-security-shiro-1.1.1.html
+[6] http://isis.apache.org/components/security/file/release-notes/isis-security-file-1.0.1.html
+[7] http://isis.apache.org/getting-started/release-notes/quickstart_wrj-archetype-1.0.3.html
+[8] http://search.maven.org
+[9] http://isis.apache.org/download.html
</pre>
<h3>Blog post</h3>
Modified: websites/staging/isis/trunk/content/core/unittestsupport.html
==============================================================================
--- websites/staging/isis/trunk/content/core/unittestsupport.html (original)
+++ websites/staging/isis/trunk/content/core/unittestsupport.html Thu Jun 6 10:16:18 2013
@@ -252,11 +252,104 @@
</h1>
</div>
-<p><div class="stub">
-This page is a stub.
+<p>This module provides unit test helpers for use by all other modules. There are also utilities that you may find useful in testing your domain objects:</p>
+
+<p>To use, update the <code>pom.xml</code>:</p>
+
+<pre>
+ <dependency>
+ <groupId>org.apache.isis.core</groupId>
+ <artifactId>isis-core-unittestsupport</artifactId>
+ </dependency>
+</pre>
+
+<h2>Bidirectional Contract Tests [1.3.0-SNAPSHOT]</h2>
+
+<p>Automatically tests that bidirectional 1:m or 1:1 associations are being maintained correctly (assuming that they follow the <a href="../applib-guide/how-tos/how-to-04-060-How-to-set-up-and-maintain-bidirectional-relationships.html">mutual registration pattern</a></p>
+
+<p><div class="note">
+Isis provides <a href="../getting-started/editor-templates.html">Eclipse templates</a> to help generate the necessary boilerplate.
</div></p>
-<p>This module provides unit test helpers for use by all other modules.</p>
+<p>For example, suppose that <code>ParentDomainObject</code> and <code>ChildDomainObject</code> have a 1:m relationship (<code>ParentDomainObject#children</code> / <code>ChildDomainObject#parent</code>), and also <code>PeerDomainObject</code> has a 1:1 relationship with itself (<code>PeerDomainObject#next</code> / <code>PeerDomainObject#previous</code>). </p>
+
+<p>The following will exercise these relationships:</p>
+
+<pre>
+public class BidirectionalRelationshipContractTestAll extends BidirectionalRelationshipContractTestAbstract {
+
+ public BidirectionalRelationshipContractTestAll() {
+ super("org.apache.isis.core.unittestsupport.bidir",
+ ImmutableMap.<Class<?>,Instantiator>of(
+ // no instantiator need be registered for ParentDomainObject.class;
+ // will default to using new InstantiatorSimple(AgreementForTesting.class),
+ ChildDomainObject.class, new InstantiatorForChildDomainObject(),
+ PeerDomainObject.class, new InstantiatorSimple(PeerDomainObjectForTesting.class)
+ ));
+ withLoggingTo(System.out);
+ }
+</div>
+</pre>
+
+<p>As you can see, for some of the types an <code>Instantiator</code> must be provided. This has two main purposes. First, for abstract classes, it nominates an alternative concrete class to be instantiated. Second, for classes (such as <code>ChildDomainObject</code>) that are <code>Comparable</code> and are held in a <code>SortedSet</code>), it provides the ability to ensure that different instances are unique when compared against each other.</p>
+
+<p>So you can see what's going on, this will log all tests to <code>System.out</code>. This can be disabled by removing the call to <code>withLoggingTo()</code>.</p>
+
+<h2>JUnitRuleMockery2</h2>
+
+<p>An extension to the JMock's <code>JunitRuleMockery</code>, providing a simpler API and also providing support for autowiring.</p>
+
+<p>For example, here we see that the class under test, an instance of <code>CollaboratingUsingSetterInjection</code>, is automatically wired up with its <code>Collaborator</code>:</p>
+
+<pre>
+public class JUnitRuleMockery2Test_autoWiring_setterInjection_happyCase {
+
+ @Rule
+ public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
+ @Mock
+ private Collaborator collaborator;
+
+ @ClassUnderTest
+ private CollaboratingUsingSetterInjection collaborating;
+
+ @Before
+ public void setUp() throws Exception {
+ collaborating = context.getClassUnderTest();
+ }
+
+ @Test
+ public void wiring() {
+ assertThat(collaborating.collaborator, is(not(nullValue())));
+ }
+</div>
+</pre>
+
+<p>The example tests can be found <a href="https://github.com/apache/isis/tree/master/core/unittestsupport/src/test/java/org/apache/isis/core/unittestsupport/jmocking">here</a></p>
+
+<h2>ValueTypeContractTestAbstract</h2>
+
+<p>Automatically tests that a custom value type implements <code>equals()</code> and <code>hashCode()</code> correctly.</p>
+
+<p>For example, testing JDK's own <code>java.math.BigInteger</code> can be done as follows:</p>
+
+<pre>
+public class ValueTypeContractTestAbstract_BigIntegerTest extends ValueTypeContractTestAbstract<BigInteger> {
+
+ @Override
+ protected List<BigInteger> getObjectsWithSameValue() {
+ return Arrays.asList(new BigInteger("1"), new BigInteger("1"));
+ }
+
+ @Override
+ protected List<BigInteger> getObjectsWithDifferentValue() {
+ return Arrays.asList(new BigInteger("2"));
+ }
+
+</div>
+</pre>
+
+<p>The example unit tests can be found <a href="https://github.com/apache/isis/tree/master/core/unittestsupport/src/test/java/org/apache/isis/core/unittestsupport/value">here</a>.</p>
Modified: websites/staging/isis/trunk/content/getting-started/resources/isis-templates.xml
==============================================================================
Binary files - no diff available.