incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1234460 [24/30] - in /incubator/isis/trunk/framework/viewer: bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/ bdd/common/src/main/java/org/apache/isis/viewer/bdd/common/components/ bdd/common/src/main/java/org/apache/isis/viewer...
Date Sun, 22 Jan 2012 08:05:57 GMT
Modified: incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/resources/domainobjects/JsonValueEncoderTest_asAdapter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/resources/domainobjects/JsonValueEncoderTest_asAdapter.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/resources/domainobjects/JsonValueEncoderTest_asAdapter.java (original)
+++ incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/resources/domainobjects/JsonValueEncoderTest_asAdapter.java Sun Jan 22 08:05:17 2012
@@ -16,8 +16,8 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.viewer.json.viewer.resources.domainobjects;
-
+package org.apache.isis.viewer.json.viewer.resources.domainobjects;
+
 import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertSame;
 
@@ -43,327 +43,326 @@ import org.jmock.integration.junit4.JUni
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-
-@RunWith(JMock.class)
-public class JsonValueEncoderTest_asAdapter {
-
-    private Mockery context = new JUnit4Mockery();
-    
-    private JsonValueEncoder jsonValueEncoder;
-    private JsonRepresentation representation;
-    private ObjectSpecification objectSpec;
-
-    private EncodableFacet encodableFacet;
-    private ObjectAdapter objectAdapter;
-
-    @Before
-    public void setUp() throws Exception {
-        objectSpec = context.mock(ObjectSpecification.class);
-        encodableFacet = context.mock(EncodableFacet.class);
-        objectAdapter = context.mock(ObjectAdapter.class);
-        
-        representation = new JsonRepresentation(TextNode.valueOf("aString"));
-        jsonValueEncoder = new JsonValueEncoder();
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenSpecIsNull() throws Exception {
-        jsonValueEncoder.asAdapter(null, representation);
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenReprIsNull() throws Exception {
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        jsonValueEncoder.asAdapter(objectSpec, null);
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenReprIsAnArray() throws Exception {
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        jsonValueEncoder.asAdapter(objectSpec, JsonRepresentation.newArray());
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenReprIsAMap() throws Exception {
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        assertNull(jsonValueEncoder.asAdapter(objectSpec, JsonRepresentation.newMap()));
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenSpecDoesNotHaveAnEncodableFacet() throws Exception {
-        allowingObjectSpecHas(EncodableFacet.class, null);
-
-        assertNull(jsonValueEncoder.asAdapter(objectSpec, representation));
-    }
-
-    @Test
-    public void whenReprIsBooleanPrimitive() throws Exception {
-        whenReprIsBoolean(boolean.class);
-    }
-
-    @Test
-    public void whenReprIsBooleanWrapper() throws Exception {
-        whenReprIsBoolean(Boolean.class);
-    }
-
-    private void whenReprIsBoolean(final Class<?> correspondingClass) {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(correspondingClass);
-        final boolean value = true;
-        representation = new JsonRepresentation(BooleanNode.valueOf(value));
-        context.checking(new Expectations() {
-            {
-                one(encodableFacet).fromEncodedString("" + value);
-                will(returnValue(objectAdapter));
-            }
-        });
-        
-        // when
-        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
-        
-        // then
-        assertSame(objectAdapter, adapter);
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenObjectSpecIsBooleanButReprIsNot() throws Exception {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(boolean.class);
-        
-        // when
-        jsonValueEncoder.asAdapter(objectSpec, representation);
-    }
-
-    @Test
-    public void whenReprIsIntegerPrimitive() throws Exception {
-        whenReprIsInteger(int.class);
-    }
-
-    @Test
-    public void whenReprIsIntegerWrapper() throws Exception {
-        whenReprIsInteger(Integer.class);
-    }
-
-    private void whenReprIsInteger(final Class<?> correspondingClass) {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(correspondingClass);
-        final int value = 123;
-        representation = new JsonRepresentation(IntNode.valueOf(value));
-        context.checking(new Expectations() {
-            {
-                one(encodableFacet).fromEncodedString("" + value);
-                will(returnValue(objectAdapter));
-            }
-        });
-        
-        // when
-        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
-        
-        // then
-        assertSame(objectAdapter, adapter);
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenObjectSpecIsIntegerButReprIsNot() throws Exception {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(int.class);
-        
+
+@RunWith(JMock.class)
+public class JsonValueEncoderTest_asAdapter {
+
+    private final Mockery context = new JUnit4Mockery();
+
+    private JsonValueEncoder jsonValueEncoder;
+    private JsonRepresentation representation;
+    private ObjectSpecification objectSpec;
+
+    private EncodableFacet encodableFacet;
+    private ObjectAdapter objectAdapter;
+
+    @Before
+    public void setUp() throws Exception {
+        objectSpec = context.mock(ObjectSpecification.class);
+        encodableFacet = context.mock(EncodableFacet.class);
+        objectAdapter = context.mock(ObjectAdapter.class);
+
+        representation = new JsonRepresentation(TextNode.valueOf("aString"));
+        jsonValueEncoder = new JsonValueEncoder();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenSpecIsNull() throws Exception {
+        jsonValueEncoder.asAdapter(null, representation);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenReprIsNull() throws Exception {
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        jsonValueEncoder.asAdapter(objectSpec, null);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenReprIsAnArray() throws Exception {
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        jsonValueEncoder.asAdapter(objectSpec, JsonRepresentation.newArray());
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenReprIsAMap() throws Exception {
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        assertNull(jsonValueEncoder.asAdapter(objectSpec, JsonRepresentation.newMap()));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenSpecDoesNotHaveAnEncodableFacet() throws Exception {
+        allowingObjectSpecHas(EncodableFacet.class, null);
+
+        assertNull(jsonValueEncoder.asAdapter(objectSpec, representation));
+    }
+
+    @Test
+    public void whenReprIsBooleanPrimitive() throws Exception {
+        whenReprIsBoolean(boolean.class);
+    }
+
+    @Test
+    public void whenReprIsBooleanWrapper() throws Exception {
+        whenReprIsBoolean(Boolean.class);
+    }
+
+    private void whenReprIsBoolean(final Class<?> correspondingClass) {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(correspondingClass);
+        final boolean value = true;
+        representation = new JsonRepresentation(BooleanNode.valueOf(value));
+        context.checking(new Expectations() {
+            {
+                one(encodableFacet).fromEncodedString("" + value);
+                will(returnValue(objectAdapter));
+            }
+        });
+
+        // when
+        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
+
+        // then
+        assertSame(objectAdapter, adapter);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenObjectSpecIsBooleanButReprIsNot() throws Exception {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(boolean.class);
+
+        // when
+        jsonValueEncoder.asAdapter(objectSpec, representation);
+    }
+
+    @Test
+    public void whenReprIsIntegerPrimitive() throws Exception {
+        whenReprIsInteger(int.class);
+    }
+
+    @Test
+    public void whenReprIsIntegerWrapper() throws Exception {
+        whenReprIsInteger(Integer.class);
+    }
+
+    private void whenReprIsInteger(final Class<?> correspondingClass) {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(correspondingClass);
+        final int value = 123;
+        representation = new JsonRepresentation(IntNode.valueOf(value));
+        context.checking(new Expectations() {
+            {
+                one(encodableFacet).fromEncodedString("" + value);
+                will(returnValue(objectAdapter));
+            }
+        });
+
+        // when
+        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
+
+        // then
+        assertSame(objectAdapter, adapter);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenObjectSpecIsIntegerButReprIsNot() throws Exception {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(int.class);
+
         representation = JsonRepresentation.newMap("foo", "bar");
-        
-        // when
-        jsonValueEncoder.asAdapter(objectSpec, representation);
-    }
-
-    @Test
-    public void whenReprIsLongPrimitive() throws Exception {
-        whenReprIsLong(long.class);
-    }
-
-    @Test
-    public void whenReprIsLongWrapper() throws Exception {
-        whenReprIsLong(Long.class);
-    }
-
-    private void whenReprIsLong(final Class<?> correspondingClass) {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(correspondingClass);
-        final long value = 1234567890L;
-        representation = new JsonRepresentation(LongNode.valueOf(value));
-        context.checking(new Expectations() {
-            {
-                one(encodableFacet).fromEncodedString("" + value);
-                will(returnValue(objectAdapter));
-            }
-        });
-        
-        // when
-        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
-        
-        // then
-        assertSame(objectAdapter, adapter);
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenObjectSpecIsLongButReprIsNot() throws Exception {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(long.class);
-        
-        // when
-        jsonValueEncoder.asAdapter(objectSpec, representation);
-    }
-
-    @Test
-    public void whenReprIsDoublePrimitive() throws Exception {
-        whenReprIsDouble(double.class);
-    }
-
-    @Test
-    public void whenReprIsDoubleWrapper() throws Exception {
-        whenReprIsDouble(Double.class);
-    }
-
-    private void whenReprIsDouble(final Class<?> correspondingClass) {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(correspondingClass);
-        final double value = 123.45;
-        representation = new JsonRepresentation(DoubleNode.valueOf(value));
-        context.checking(new Expectations() {
-            {
-                one(encodableFacet).fromEncodedString("" + value);
-                will(returnValue(objectAdapter));
-            }
-        });
-        
-        // when
-        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
-        
-        // then
-        assertSame(objectAdapter, adapter);
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenObjectSpecIsDoubleButReprIsNot() throws Exception {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(double.class);
+
+        // when
+        jsonValueEncoder.asAdapter(objectSpec, representation);
+    }
+
+    @Test
+    public void whenReprIsLongPrimitive() throws Exception {
+        whenReprIsLong(long.class);
+    }
+
+    @Test
+    public void whenReprIsLongWrapper() throws Exception {
+        whenReprIsLong(Long.class);
+    }
+
+    private void whenReprIsLong(final Class<?> correspondingClass) {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(correspondingClass);
+        final long value = 1234567890L;
+        representation = new JsonRepresentation(LongNode.valueOf(value));
+        context.checking(new Expectations() {
+            {
+                one(encodableFacet).fromEncodedString("" + value);
+                will(returnValue(objectAdapter));
+            }
+        });
+
+        // when
+        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
+
+        // then
+        assertSame(objectAdapter, adapter);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenObjectSpecIsLongButReprIsNot() throws Exception {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(long.class);
+
+        // when
+        jsonValueEncoder.asAdapter(objectSpec, representation);
+    }
+
+    @Test
+    public void whenReprIsDoublePrimitive() throws Exception {
+        whenReprIsDouble(double.class);
+    }
+
+    @Test
+    public void whenReprIsDoubleWrapper() throws Exception {
+        whenReprIsDouble(Double.class);
+    }
+
+    private void whenReprIsDouble(final Class<?> correspondingClass) {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(correspondingClass);
+        final double value = 123.45;
+        representation = new JsonRepresentation(DoubleNode.valueOf(value));
+        context.checking(new Expectations() {
+            {
+                one(encodableFacet).fromEncodedString("" + value);
+                will(returnValue(objectAdapter));
+            }
+        });
+
+        // when
+        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
+
+        // then
+        assertSame(objectAdapter, adapter);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenObjectSpecIsDoubleButReprIsNot() throws Exception {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(double.class);
 
         representation = JsonRepresentation.newMap("foo", "bar");
-
-        // when
-        jsonValueEncoder.asAdapter(objectSpec, representation);
-    }
-
-    @Test
-    public void whenReprIsBigInteger() throws Exception {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(BigInteger.class);
-        final BigInteger value = BigInteger.valueOf(123);
-        representation = new JsonRepresentation(BigIntegerNode.valueOf(value));
-        context.checking(new Expectations() {
-            {
-                one(encodableFacet).fromEncodedString("" + value);
-                will(returnValue(objectAdapter));
-            }
-        });
-        
-        // when
-        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
-        
-        // then
-        assertSame(objectAdapter, adapter);
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenObjectSpecIsBigIntegerButReprIsNot() throws Exception {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(BigInteger.class);
-        
+
+        // when
+        jsonValueEncoder.asAdapter(objectSpec, representation);
+    }
+
+    @Test
+    public void whenReprIsBigInteger() throws Exception {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(BigInteger.class);
+        final BigInteger value = BigInteger.valueOf(123);
+        representation = new JsonRepresentation(BigIntegerNode.valueOf(value));
+        context.checking(new Expectations() {
+            {
+                one(encodableFacet).fromEncodedString("" + value);
+                will(returnValue(objectAdapter));
+            }
+        });
+
+        // when
+        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
+
+        // then
+        assertSame(objectAdapter, adapter);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenObjectSpecIsBigIntegerButReprIsNot() throws Exception {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(BigInteger.class);
+
         representation = JsonRepresentation.newMap("foo", "bar");
 
-        // when
-        jsonValueEncoder.asAdapter(objectSpec, representation);
-    }
-
-    @Test
-    public void whenReprIsBigDecimal() throws Exception {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(BigDecimal.class);
-        final BigDecimal value = new BigDecimal("123234234.45612312343535");
-        representation = new JsonRepresentation(DecimalNode.valueOf(value));
-        context.checking(new Expectations() {
-            {
-                one(encodableFacet).fromEncodedString("" + value);
-                will(returnValue(objectAdapter));
-            }
-        });
-        
-        // when
-        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
-        
-        // then
-        assertSame(objectAdapter, adapter);
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenObjectSpecIsBigDecimalButReprIsNot() throws Exception {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(BigDecimal.class);
+        // when
+        jsonValueEncoder.asAdapter(objectSpec, representation);
+    }
+
+    @Test
+    public void whenReprIsBigDecimal() throws Exception {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(BigDecimal.class);
+        final BigDecimal value = new BigDecimal("123234234.45612312343535");
+        representation = new JsonRepresentation(DecimalNode.valueOf(value));
+        context.checking(new Expectations() {
+            {
+                one(encodableFacet).fromEncodedString("" + value);
+                will(returnValue(objectAdapter));
+            }
+        });
+
+        // when
+        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
+
+        // then
+        assertSame(objectAdapter, adapter);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenObjectSpecIsBigDecimalButReprIsNot() throws Exception {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(BigDecimal.class);
 
         representation = JsonRepresentation.newMap("foo", "bar");
-
-        // when
-        jsonValueEncoder.asAdapter(objectSpec, representation);
-    }
-
-
-    @Test
-    public void whenReprIsString() throws Exception {
-        // given
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        allowingObjectSpecCorrespondingClassIs(String.class);
-        representation = new JsonRepresentation(TextNode.valueOf("aString"));
-        
-        context.checking(new Expectations() {
-            {
-                one(encodableFacet).fromEncodedString("aString");
-                will(returnValue(objectAdapter));
-            }
-        });
-        
-        // when
-        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
-        
-        // then
-        assertSame(objectAdapter, adapter);
-    }
-    
-    private <T extends Facet> void allowingObjectSpecHas(final Class<T> facetClass, final T encodableFacet) {
-        context.checking(new Expectations() {
-            {
-                allowing(objectSpec).getFacet(facetClass);
-                will(returnValue(encodableFacet));
-            }
-        });
-    }
-
-    private void allowingObjectSpecCorrespondingClassIs(final Class<?> result) {
-        context.checking(new Expectations() {
-            {
-                allowing(objectSpec).getCorrespondingClass();
-                will(returnValue(result));
-            }
-        });
-    }
-
-}
+
+        // when
+        jsonValueEncoder.asAdapter(objectSpec, representation);
+    }
+
+    @Test
+    public void whenReprIsString() throws Exception {
+        // given
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        allowingObjectSpecCorrespondingClassIs(String.class);
+        representation = new JsonRepresentation(TextNode.valueOf("aString"));
+
+        context.checking(new Expectations() {
+            {
+                one(encodableFacet).fromEncodedString("aString");
+                will(returnValue(objectAdapter));
+            }
+        });
+
+        // when
+        final ObjectAdapter adapter = jsonValueEncoder.asAdapter(objectSpec, representation);
+
+        // then
+        assertSame(objectAdapter, adapter);
+    }
+
+    private <T extends Facet> void allowingObjectSpecHas(final Class<T> facetClass, final T encodableFacet) {
+        context.checking(new Expectations() {
+            {
+                allowing(objectSpec).getFacet(facetClass);
+                will(returnValue(encodableFacet));
+            }
+        });
+    }
+
+    private void allowingObjectSpecCorrespondingClassIs(final Class<?> result) {
+        context.checking(new Expectations() {
+            {
+                allowing(objectSpec).getCorrespondingClass();
+                will(returnValue(result));
+            }
+        });
+    }
+
+}

Modified: incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/resources/domainobjects/JsonValueEncoderTest_asObject.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/resources/domainobjects/JsonValueEncoderTest_asObject.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/resources/domainobjects/JsonValueEncoderTest_asObject.java (original)
+++ incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/resources/domainobjects/JsonValueEncoderTest_asObject.java Sun Jan 22 08:05:17 2012
@@ -16,8 +16,8 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.viewer.json.viewer.resources.domainobjects;
-
+package org.apache.isis.viewer.json.viewer.resources.domainobjects;
+
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertSame;
 
@@ -36,214 +36,211 @@ import org.jmock.integration.junit4.JUni
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-
-@RunWith(JMock.class)
-public class JsonValueEncoderTest_asObject {
-
-    private Mockery context = new JUnit4Mockery();
-    
-    private JsonValueEncoder jsonValueEncoder;
-    private JsonRepresentation representation;
-    private ObjectAdapter objectAdapter;
-    private ObjectSpecification objectSpec;
-
-    private EncodableFacet encodableFacet;
-    private Object encoded;
-
-    @Before
-    public void setUp() throws Exception {
-        objectAdapter = context.mock(ObjectAdapter.class);
-        objectSpec = context.mock(ObjectSpecification.class);
-        
-        context.checking(new Expectations() {
-            {
-                allowing(objectAdapter).getSpecification();
-                will(returnValue(objectSpec));
-            }
-        });
-        encodableFacet = context.mock(EncodableFacet.class);
-        
-        encoded = new Object();
-        
-        jsonValueEncoder = new JsonValueEncoder();
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenAdapterIsNull() throws Exception {
-        jsonValueEncoder.asObject(null);
-    }
-
-    @Test(expected=IllegalArgumentException.class)
-    public void whenObjectAdapterIsNotSpecialCaseAndSpecIsNotEncodable() throws Exception {
-        allowingObjectSpecCorrespondingClassIs(String.class);
-        allowingObjectSpecHas(EncodableFacet.class, null);
-        jsonValueEncoder.asObject(objectAdapter);
-    }
-
-    @Test
-    public void whenBooleanPrimitive() throws Exception {
-        whenBoolean(boolean.class);
-    }
-
-    @Test
-    public void whenBooleanWrapper() throws Exception {
-        whenBoolean(Boolean.class);
-    }
-
-    private void whenBoolean(final Class<?> cls) {
-        allowingObjectSpecCorrespondingClassIs(cls);
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        never(encodableFacet);
-        context.checking(new Expectations() {
-            {
-                one(objectAdapter).getObject();
-                will(returnValue(true));
-            }
-        });
-        assertEquals(true, jsonValueEncoder.asObject(objectAdapter));
-    }
-
-
-    @Test
-    public void whenIntegerPrimitive() throws Exception {
-        whenInteger(int.class);
-    }
-
-    @Test
-    public void whenIntegerWrapper() throws Exception {
-        whenInteger(Integer.class);
-    }
-
-    private void whenInteger(final Class<?> cls) {
-        allowingObjectSpecCorrespondingClassIs(cls);
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        never(encodableFacet);
-        context.checking(new Expectations() {
-            {
-                one(objectAdapter).getObject();
-                will(returnValue(123));
-            }
-        });
-        assertEquals(123, jsonValueEncoder.asObject(objectAdapter));
-    }
-
-    @Test
-    public void whenLongPrimitive() throws Exception {
-        whenLong(long.class);
-    }
-
-    @Test
-    public void whenLongWrapper() throws Exception {
-        whenLong(Long.class);
-    }
-
-    private void whenLong(final Class<?> cls) {
-        allowingObjectSpecCorrespondingClassIs(cls);
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        never(encodableFacet);
-        context.checking(new Expectations() {
-            {
-                one(objectAdapter).getObject();
-                will(returnValue(123456789L));
-            }
-        });
-        assertEquals(123456789L, jsonValueEncoder.asObject(objectAdapter));
-    }
-
-    @Test
-    public void whenDoublePrimitive() throws Exception {
-        whenDouble(double.class);
-    }
-
-    @Test
-    public void whenDoubleWrapper() throws Exception {
-        whenDouble(Double.class);
-    }
-
-    private void whenDouble(final Class<?> cls) {
-        allowingObjectSpecCorrespondingClassIs(cls);
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        never(encodableFacet);
-        context.checking(new Expectations() {
-            {
-                one(objectAdapter).getObject();
-                will(returnValue(12345.6789));
-            }
-        });
-        assertEquals(12345.6789, jsonValueEncoder.asObject(objectAdapter));
-    }
-
-    @Test
-    public void whenBigInteger() throws Exception {
-        allowingObjectSpecCorrespondingClassIs(BigInteger.class);
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        never(encodableFacet);
-        final BigInteger value = new BigInteger("123456789012345");
-        context.checking(new Expectations() {
-
-            {
-                one(objectAdapter).getObject();
-                will(returnValue(value));
-            }
-        });
-        assertEquals(value, jsonValueEncoder.asObject(objectAdapter));
-    }
-
-    @Test
-    public void whenBigDecimal() throws Exception {
-        allowingObjectSpecCorrespondingClassIs(BigDecimal.class);
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        never(encodableFacet);
-        final BigDecimal value = new BigDecimal("1234567890.1234567890");
-        context.checking(new Expectations() {
-
-            {
-                one(objectAdapter).getObject();
-                will(returnValue(value));
-            }
-        });
-        assertEquals(value, jsonValueEncoder.asObject(objectAdapter));
-    }
-
-    
-    @Test
-    public void whenString() throws Exception {
-        allowingObjectSpecCorrespondingClassIs(String.class);
-        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
-        context.checking(new Expectations() {
-            {
-                one(encodableFacet).toEncodedString(objectAdapter);
-                will(returnValue("encodedString"));
-            }
-        });
-        assertSame("encodedString", jsonValueEncoder.asObject(objectAdapter));
-    }
-
-    private void allowingObjectSpecCorrespondingClassIs(final Class<?> result) {
-        context.checking(new Expectations() {
-            {
-                allowing(objectSpec).getCorrespondingClass();
-                will(returnValue(result));
-            }
-        });
-    }
-
-    private <T extends Facet> void allowingObjectSpecHas(final Class<T> facetClass, final T encodableFacet) {
-        context.checking(new Expectations() {
-            {
-                allowing(objectSpec).getFacet(facetClass);
-                will(returnValue(encodableFacet));
-            }
-        });
-    }
-
-    private void never(final EncodableFacet encodableFacet2) {
-        context.checking(new Expectations() {
-            {
-                never(encodableFacet2);
-            }
-        });
-    }
-
-
-}
+
+@RunWith(JMock.class)
+public class JsonValueEncoderTest_asObject {
+
+    private final Mockery context = new JUnit4Mockery();
+
+    private JsonValueEncoder jsonValueEncoder;
+    private JsonRepresentation representation;
+    private ObjectAdapter objectAdapter;
+    private ObjectSpecification objectSpec;
+
+    private EncodableFacet encodableFacet;
+    private Object encoded;
+
+    @Before
+    public void setUp() throws Exception {
+        objectAdapter = context.mock(ObjectAdapter.class);
+        objectSpec = context.mock(ObjectSpecification.class);
+
+        context.checking(new Expectations() {
+            {
+                allowing(objectAdapter).getSpecification();
+                will(returnValue(objectSpec));
+            }
+        });
+        encodableFacet = context.mock(EncodableFacet.class);
+
+        encoded = new Object();
+
+        jsonValueEncoder = new JsonValueEncoder();
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenAdapterIsNull() throws Exception {
+        jsonValueEncoder.asObject(null);
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void whenObjectAdapterIsNotSpecialCaseAndSpecIsNotEncodable() throws Exception {
+        allowingObjectSpecCorrespondingClassIs(String.class);
+        allowingObjectSpecHas(EncodableFacet.class, null);
+        jsonValueEncoder.asObject(objectAdapter);
+    }
+
+    @Test
+    public void whenBooleanPrimitive() throws Exception {
+        whenBoolean(boolean.class);
+    }
+
+    @Test
+    public void whenBooleanWrapper() throws Exception {
+        whenBoolean(Boolean.class);
+    }
+
+    private void whenBoolean(final Class<?> cls) {
+        allowingObjectSpecCorrespondingClassIs(cls);
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        never(encodableFacet);
+        context.checking(new Expectations() {
+            {
+                one(objectAdapter).getObject();
+                will(returnValue(true));
+            }
+        });
+        assertEquals(true, jsonValueEncoder.asObject(objectAdapter));
+    }
+
+    @Test
+    public void whenIntegerPrimitive() throws Exception {
+        whenInteger(int.class);
+    }
+
+    @Test
+    public void whenIntegerWrapper() throws Exception {
+        whenInteger(Integer.class);
+    }
+
+    private void whenInteger(final Class<?> cls) {
+        allowingObjectSpecCorrespondingClassIs(cls);
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        never(encodableFacet);
+        context.checking(new Expectations() {
+            {
+                one(objectAdapter).getObject();
+                will(returnValue(123));
+            }
+        });
+        assertEquals(123, jsonValueEncoder.asObject(objectAdapter));
+    }
+
+    @Test
+    public void whenLongPrimitive() throws Exception {
+        whenLong(long.class);
+    }
+
+    @Test
+    public void whenLongWrapper() throws Exception {
+        whenLong(Long.class);
+    }
+
+    private void whenLong(final Class<?> cls) {
+        allowingObjectSpecCorrespondingClassIs(cls);
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        never(encodableFacet);
+        context.checking(new Expectations() {
+            {
+                one(objectAdapter).getObject();
+                will(returnValue(123456789L));
+            }
+        });
+        assertEquals(123456789L, jsonValueEncoder.asObject(objectAdapter));
+    }
+
+    @Test
+    public void whenDoublePrimitive() throws Exception {
+        whenDouble(double.class);
+    }
+
+    @Test
+    public void whenDoubleWrapper() throws Exception {
+        whenDouble(Double.class);
+    }
+
+    private void whenDouble(final Class<?> cls) {
+        allowingObjectSpecCorrespondingClassIs(cls);
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        never(encodableFacet);
+        context.checking(new Expectations() {
+            {
+                one(objectAdapter).getObject();
+                will(returnValue(12345.6789));
+            }
+        });
+        assertEquals(12345.6789, jsonValueEncoder.asObject(objectAdapter));
+    }
+
+    @Test
+    public void whenBigInteger() throws Exception {
+        allowingObjectSpecCorrespondingClassIs(BigInteger.class);
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        never(encodableFacet);
+        final BigInteger value = new BigInteger("123456789012345");
+        context.checking(new Expectations() {
+
+            {
+                one(objectAdapter).getObject();
+                will(returnValue(value));
+            }
+        });
+        assertEquals(value, jsonValueEncoder.asObject(objectAdapter));
+    }
+
+    @Test
+    public void whenBigDecimal() throws Exception {
+        allowingObjectSpecCorrespondingClassIs(BigDecimal.class);
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        never(encodableFacet);
+        final BigDecimal value = new BigDecimal("1234567890.1234567890");
+        context.checking(new Expectations() {
+
+            {
+                one(objectAdapter).getObject();
+                will(returnValue(value));
+            }
+        });
+        assertEquals(value, jsonValueEncoder.asObject(objectAdapter));
+    }
+
+    @Test
+    public void whenString() throws Exception {
+        allowingObjectSpecCorrespondingClassIs(String.class);
+        allowingObjectSpecHas(EncodableFacet.class, encodableFacet);
+        context.checking(new Expectations() {
+            {
+                one(encodableFacet).toEncodedString(objectAdapter);
+                will(returnValue("encodedString"));
+            }
+        });
+        assertSame("encodedString", jsonValueEncoder.asObject(objectAdapter));
+    }
+
+    private void allowingObjectSpecCorrespondingClassIs(final Class<?> result) {
+        context.checking(new Expectations() {
+            {
+                allowing(objectSpec).getCorrespondingClass();
+                will(returnValue(result));
+            }
+        });
+    }
+
+    private <T extends Facet> void allowingObjectSpecHas(final Class<T> facetClass, final T encodableFacet) {
+        context.checking(new Expectations() {
+            {
+                allowing(objectSpec).getFacet(facetClass);
+                will(returnValue(encodableFacet));
+            }
+        });
+    }
+
+    private void never(final EncodableFacet encodableFacet2) {
+        context.checking(new Expectations() {
+            {
+                never(encodableFacet2);
+            }
+        });
+    }
+
+}

Modified: incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/util/MapUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/util/MapUtilsTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/util/MapUtilsTest.java (original)
+++ incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/util/MapUtilsTest.java Sun Jan 22 08:05:17 2012
@@ -16,34 +16,34 @@
  *  specific language governing permissions and limitations
  *  under the License.
  */
-package org.apache.isis.viewer.json.viewer.util;
+package org.apache.isis.viewer.json.viewer.util;
+
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
 
 import java.util.Map;
 
 import org.junit.Test;
-
-
-public class MapUtilsTest {
-
-	@Test
-	public void happyCase() throws Exception {
-	    Map<String, String> map = MapUtils.mapOf("foo", "bar", "foz", "boz");
-	    assertThat(map.get("foo"), is("bar"));
-	    assertThat(map.get("foz"), is("boz"));
-	    assertThat(map.size(), is(2));
-	}
-
-   @Test
-    public void emptyList() throws Exception {
-        Map<String, String> map = MapUtils.mapOf();
-        assertThat(map.size(), is(0));
-    }
-
-   @Test(expected=IllegalArgumentException.class)
-   public void uneven() throws Exception {
-       MapUtils.mapOf("foo");
-   }
-
-}
+
+public class MapUtilsTest {
+
+    @Test
+    public void happyCase() throws Exception {
+        final Map<String, String> map = MapUtils.mapOf("foo", "bar", "foz", "boz");
+        assertThat(map.get("foo"), is("bar"));
+        assertThat(map.get("foz"), is("boz"));
+        assertThat(map.size(), is(2));
+    }
+
+    @Test
+    public void emptyList() throws Exception {
+        final Map<String, String> map = MapUtils.mapOf();
+        assertThat(map.size(), is(0));
+    }
+
+    @Test(expected = IllegalArgumentException.class)
+    public void uneven() throws Exception {
+        MapUtils.mapOf("foo");
+    }
+
+}

Modified: incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/util/UrlParserUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/util/UrlParserUtilsTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/util/UrlParserUtilsTest.java (original)
+++ incubator/isis/trunk/framework/viewer/json/json-viewer/src/test/java/org/apache/isis/viewer/json/viewer/util/UrlParserUtilsTest.java Sun Jan 22 08:05:17 2012
@@ -27,33 +27,33 @@ public class UrlParserUtilsTest {
 
     @Test
     public void oidFromLink() throws Exception {
-        JsonRepresentation link = JsonRepresentation.newMap();
+        final JsonRepresentation link = JsonRepresentation.newMap();
         link.mapPut("href", "http://localhost/objects/OID:1");
-        String oidFromHref = UrlParserUtils.oidFromLink(link);
+        final String oidFromHref = UrlParserUtils.oidFromLink(link);
         assertEquals("OID:1", oidFromHref);
     }
 
     @Test
     public void domainTypeFromLink() throws Exception {
-        JsonRepresentation link = JsonRepresentation.newMap();
+        final JsonRepresentation link = JsonRepresentation.newMap();
         link.mapPut("href", "http://localhost/domainTypes/com.mycompany.myapp.Customer");
-        String oidFromHref = UrlParserUtils.domainTypeFrom(link);
+        final String oidFromHref = UrlParserUtils.domainTypeFrom(link);
         assertEquals("com.mycompany.myapp.Customer", oidFromHref);
     }
 
     @Test
     public void domainTypeFromLinkTrailingSlash() throws Exception {
-        JsonRepresentation link = JsonRepresentation.newMap();
+        final JsonRepresentation link = JsonRepresentation.newMap();
         link.mapPut("href", "http://localhost/domainTypes/com.mycompany.myapp.Customer/");
-        String oidFromHref = UrlParserUtils.domainTypeFrom(link);
+        final String oidFromHref = UrlParserUtils.domainTypeFrom(link);
         assertEquals("com.mycompany.myapp.Customer", oidFromHref);
     }
 
     @Test
     public void domainTypeFromLinkFollowingStuff() throws Exception {
-        JsonRepresentation link = JsonRepresentation.newMap();
+        final JsonRepresentation link = JsonRepresentation.newMap();
         link.mapPut("href", "http://localhost/domainTypes/com.mycompany.myapp.Customer/otherStuffHere");
-        String oidFromHref = UrlParserUtils.domainTypeFrom(link);
+        final String oidFromHref = UrlParserUtils.domainTypeFrom(link);
         assertEquals("com.mycompany.myapp.Customer", oidFromHref);
     }
 

Modified: incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/AbstractTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/AbstractTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/AbstractTest.java (original)
+++ incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/AbstractTest.java Sun Jan 22 08:05:17 2012
@@ -19,12 +19,6 @@
 
 package junit;
 
-
-import org.junit.After;
-import org.junit.Before;
-import org.junit.runner.RunWith;
-
-
 import org.apache.isis.applib.DomainObjectContainer;
 import org.apache.isis.progmodel.wrapper.applib.WrapperFactory;
 import org.apache.isis.progmodel.wrapper.applib.WrapperObject;
@@ -34,6 +28,9 @@ import org.apache.isis.viewer.junit.Conf
 import org.apache.isis.viewer.junit.IsisTestRunner;
 import org.apache.isis.viewer.junit.Service;
 import org.apache.isis.viewer.junit.Services;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.runner.RunWith;
 
 @RunWith(IsisTestRunner.class)
 @ConfigDir("../../viewer/dnd-tck/src/main/resources")
@@ -44,8 +41,9 @@ public abstract class AbstractTest {
     private WrapperFactory wrapperFactory;
 
     /**
-     * The {@link WrapperFactory#wrap(Object) wrapped} equivalent of the {@link #setFoobarRepository(PrimitiveValuedEntityRepository)
-     * injected} {@link PrimitiveValuedEntityRepository}.
+     * The {@link WrapperFactory#wrap(Object) wrapped} equivalent of the
+     * {@link #setFoobarRepository(PrimitiveValuedEntityRepository) injected}
+     * {@link PrimitiveValuedEntityRepository}.
      */
     protected PrimitiveValuedEntityRepository primitivesEntityRepository;
 
@@ -58,14 +56,14 @@ public abstract class AbstractTest {
     public void setUp() throws Exception {
     }
 
-    protected <T> T wrapped(T obj) {
+    protected <T> T wrapped(final T obj) {
         return wrapperFactory.wrap(obj);
     }
 
     @SuppressWarnings("unchecked")
-    protected <T> T unwrapped(T obj) {
+    protected <T> T unwrapped(final T obj) {
         if (obj instanceof WrapperObject) {
-            WrapperObject wrapperObject = (WrapperObject) obj;
+            final WrapperObject wrapperObject = (WrapperObject) obj;
             return (T) wrapperObject.wrapped();
         }
         return obj;
@@ -83,7 +81,7 @@ public abstract class AbstractTest {
         return wrapperFactory;
     }
 
-    public void setWrapperFactory(WrapperFactory wrapperFactory) {
+    public void setWrapperFactory(final WrapperFactory wrapperFactory) {
         this.wrapperFactory = wrapperFactory;
     }
 

Modified: incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/todo/ScalarEntityRepositoryTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/todo/ScalarEntityRepositoryTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/todo/ScalarEntityRepositoryTest.java (original)
+++ incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/todo/ScalarEntityRepositoryTest.java Sun Jan 22 08:05:17 2012
@@ -28,20 +28,19 @@ import java.util.List;
 
 import junit.AbstractTest;
 
-import org.junit.Ignore;
-import org.junit.Test;
-
-
 import org.apache.isis.tck.dom.scalars.PrimitiveValuedEntity;
 import org.apache.isis.tck.fixture.scalars.PrimitiveValuedEntityFixture;
 import org.apache.isis.viewer.junit.Fixture;
 import org.apache.isis.viewer.junit.Fixtures;
+import org.junit.Ignore;
+import org.junit.Test;
 
 @Fixtures({ @Fixture(PrimitiveValuedEntityFixture.class) })
 public class ScalarEntityRepositoryTest extends AbstractTest {
 
     @Test
-    public void dummy(){}
+    public void dummy() {
+    }
 
     @Ignore
     @Test
@@ -53,7 +52,7 @@ public class ScalarEntityRepositoryTest 
     @Ignore
     @Test
     public void canCreateScalarEntityItem() throws Exception {
-        PrimitiveValuedEntity newItem = primitivesEntityRepository.newEntity();
+        final PrimitiveValuedEntity newItem = primitivesEntityRepository.newEntity();
         assertThat(newItem, is(not(nullValue())));
         assertThat(getDomainObjectContainer().isPersistent(newItem), is(true));
     }

Modified: incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/todo/ScalarEntityTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/todo/ScalarEntityTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/todo/ScalarEntityTest.java (original)
+++ incubator/isis/trunk/framework/viewer/junit-tck/src/test/java/junit/todo/ScalarEntityTest.java Sun Jan 22 08:05:17 2012
@@ -28,7 +28,6 @@ import org.apache.isis.viewer.junit.Fixt
 import org.junit.Before;
 import org.junit.Test;
 
-
 @Fixtures({ @Fixture(PrimitiveValuedEntityFixture.class) })
 public class ScalarEntityTest extends AbstractTest {
 
@@ -41,7 +40,7 @@ public class ScalarEntityTest extends Ab
     }
 
     @Test
-    public void dummy(){}
+    public void dummy() {
+    }
 
-    
 }

Modified: incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/IsisTestRunner.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/IsisTestRunner.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/IsisTestRunner.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/IsisTestRunner.java Sun Jan 22 08:05:17 2012
@@ -83,7 +83,9 @@ public class IsisTestRunner extends JUni
         final Description description = methodDescription(method);
 
         final IsisConfigurationBuilder isisConfigurationBuilder = new IsisConfigurationBuilderDefault(configDirIfAny);
-        isisConfigurationBuilder.add(SystemConstants.NOSPLASH_KEY, "" + true); // switch off splash
+        isisConfigurationBuilder.add(SystemConstants.NOSPLASH_KEY, "" + true); // switch
+                                                                               // off
+                                                                               // splash
 
         final InstallerLookupDefault installerLookup = new InstallerLookupDefault();
         isisConfigurationBuilder.injectInto(installerLookup);
@@ -92,7 +94,8 @@ public class IsisTestRunner extends JUni
         IsisSystemUsingInstallersWithinJunit system = null;
         AuthenticationSession session = null;
         try {
-            // init the system; cf similar code in Isis and IsisServletContextInitializer
+            // init the system; cf similar code in Isis and
+            // IsisServletContextInitializer
             final DeploymentType deploymentType = DeploymentType.PROTOTYPE;
 
             // TODO: replace with regular IsisSystem and remove this subclass.

Modified: incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/AnnotationInstaller.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/AnnotationInstaller.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/AnnotationInstaller.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/AnnotationInstaller.java Sun Jan 22 08:05:17 2012
@@ -12,15 +12,15 @@ import org.apache.isis.viewer.junit.Pers
 public class AnnotationInstaller {
 
     /**
-     * Should be called prior to installing; typically called immediately after instantiation.
+     * Should be called prior to installing; typically called immediately after
+     * instantiation.
      * 
      * <p>
-     * Note: an alternative design would be to have a 1-arg constructor, but the convention for installers is to make
-     * them no-arg.
+     * Note: an alternative design would be to have a 1-arg constructor, but the
+     * convention for installers is to make them no-arg.
      */
     // {{ AuthenticationManagerInstaller
-    public AuthenticationManagerInstaller addAuthenticatorAnnotatedOn(final Class<?> javaClass)
-        throws InstantiationException, IllegalAccessException {
+    public AuthenticationManagerInstaller addAuthenticatorAnnotatedOn(final Class<?> javaClass) throws InstantiationException, IllegalAccessException {
         final Authenticator authenticatorAnnotation = javaClass.getAnnotation(Authenticator.class);
         if (authenticatorAnnotation != null) {
             return addAuthenticatorRepresentedBy(authenticatorAnnotation);
@@ -30,8 +30,7 @@ public class AnnotationInstaller {
 
     }
 
-    private AuthenticationManagerInstaller addAuthenticatorRepresentedBy(final Authenticator authenticatorAnnotation)
-        throws InstantiationException, IllegalAccessException {
+    private AuthenticationManagerInstaller addAuthenticatorRepresentedBy(final Authenticator authenticatorAnnotation) throws InstantiationException, IllegalAccessException {
         final Class<?> fixtureClass = authenticatorAnnotation.value();
         return (AuthenticationManagerInstaller) fixtureClass.newInstance();
     }
@@ -39,8 +38,7 @@ public class AnnotationInstaller {
     // }}
 
     // {{ AuthorizationManagerInstaller
-    public AuthorizationManagerInstaller addAuthorizerAnnotatedOn(final Class<?> javaClass)
-        throws InstantiationException, IllegalAccessException {
+    public AuthorizationManagerInstaller addAuthorizerAnnotatedOn(final Class<?> javaClass) throws InstantiationException, IllegalAccessException {
         final Authorizer authorizorAnnotation = javaClass.getAnnotation(Authorizer.class);
         if (authorizorAnnotation != null) {
             return addAuthorizerRepresentedBy(authorizorAnnotation);
@@ -50,8 +48,7 @@ public class AnnotationInstaller {
 
     }
 
-    private AuthorizationManagerInstaller addAuthorizerRepresentedBy(final Authorizer authorizorAnnotation)
-        throws InstantiationException, IllegalAccessException {
+    private AuthorizationManagerInstaller addAuthorizerRepresentedBy(final Authorizer authorizorAnnotation) throws InstantiationException, IllegalAccessException {
         final Class<?> fixtureClass = authorizorAnnotation.value();
         return (AuthorizationManagerInstaller) fixtureClass.newInstance();
     }
@@ -59,8 +56,7 @@ public class AnnotationInstaller {
     // }}
 
     // {{ PersistenceMechanismInstaller
-    public PersistenceMechanismInstaller addPersistorAnnotatedOn(final Class<?> javaClass)
-        throws InstantiationException, IllegalAccessException {
+    public PersistenceMechanismInstaller addPersistorAnnotatedOn(final Class<?> javaClass) throws InstantiationException, IllegalAccessException {
         final Persistor annotation = javaClass.getAnnotation(Persistor.class);
         if (annotation != null) {
             return addPersistorRepresentedBy(annotation);
@@ -70,8 +66,7 @@ public class AnnotationInstaller {
 
     }
 
-    private PersistenceMechanismInstaller addPersistorRepresentedBy(final Persistor annotation)
-        throws InstantiationException, IllegalAccessException {
+    private PersistenceMechanismInstaller addPersistorRepresentedBy(final Persistor annotation) throws InstantiationException, IllegalAccessException {
         final Class<?> fixtureClass = annotation.value();
         return (PersistenceMechanismInstaller) fixtureClass.newInstance();
     }

Modified: incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/FixtureInstallerAnnotatedClass.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/FixtureInstallerAnnotatedClass.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/FixtureInstallerAnnotatedClass.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/FixtureInstallerAnnotatedClass.java Sun Jan 22 08:05:17 2012
@@ -43,7 +43,8 @@ public class FixtureInstallerAnnotatedCl
     // ///////////////////////////////////////////
 
     /**
-     * Just copies the fixtures added using {@link #addFixturesAnnotatedOn(Class)} into the delegate.
+     * Just copies the fixtures added using
+     * {@link #addFixturesAnnotatedOn(Class)} into the delegate.
      */
     @Override
     protected void addFixturesTo(final FixturesInstallerDelegate delegate) {
@@ -57,11 +58,12 @@ public class FixtureInstallerAnnotatedCl
     // ///////////////////////////////////////////
 
     /**
-     * Should be called prior to installing; typically called immediately after instantiation.
+     * Should be called prior to installing; typically called immediately after
+     * instantiation.
      * 
      * <p>
-     * Note: an alternative design would be to have a 1-arg constructor, but the convention for installers is to make
-     * them no-arg.
+     * Note: an alternative design would be to have a 1-arg constructor, but the
+     * convention for installers is to make them no-arg.
      */
     public void addFixturesAnnotatedOn(final Class<?> javaClass) throws InstantiationException, IllegalAccessException {
         final Fixtures fixturesAnnotation = javaClass.getAnnotation(Fixtures.class);
@@ -78,8 +80,7 @@ public class FixtureInstallerAnnotatedCl
         }
     }
 
-    private void addFixtureRepresentedBy(final Fixture fixtureAnnotation, final List<Object> fixtures)
-        throws InstantiationException, IllegalAccessException {
+    private void addFixtureRepresentedBy(final Fixture fixtureAnnotation, final List<Object> fixtures) throws InstantiationException, IllegalAccessException {
         final Class<?> fixtureClass = fixtureAnnotation.value();
         fixtures.add(fixtureClass.newInstance());
     }

Modified: incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/IsisSystemUsingInstallersWithinJunit.java Sun Jan 22 08:05:17 2012
@@ -19,37 +19,31 @@
 
 package org.apache.isis.viewer.junit.internal;
 
-import org.junit.internal.runners.TestClass;
-
 import org.apache.isis.core.commons.exceptions.IsisException;
 import org.apache.isis.runtimes.dflt.profilestores.dflt.InMemoryUserProfileStoreInstaller;
 import org.apache.isis.runtimes.dflt.runtime.installerregistry.InstallerLookup;
 import org.apache.isis.runtimes.dflt.runtime.system.DeploymentType;
 import org.apache.isis.runtimes.dflt.runtime.systemusinginstallers.IsisSystemUsingInstallers;
+import org.junit.internal.runners.TestClass;
 
 public class IsisSystemUsingInstallersWithinJunit extends IsisSystemUsingInstallers {
 
     private final TestClass testClass;
 
-    public IsisSystemUsingInstallersWithinJunit(final DeploymentType deploymentType,
-        final InstallerLookup installerLookup, final TestClass testClass) {
+    public IsisSystemUsingInstallersWithinJunit(final DeploymentType deploymentType, final InstallerLookup installerLookup, final TestClass testClass) {
         super(deploymentType, installerLookup);
         this.testClass = testClass;
 
-        AnnotationInstaller installer = new AnnotationInstaller();
+        final AnnotationInstaller installer = new AnnotationInstaller();
 
         try {
-            setAuthenticationInstaller(getInstallerLookup().injectDependenciesInto(
-                installer.addAuthenticatorAnnotatedOn(this.testClass.getJavaClass())));
+            setAuthenticationInstaller(getInstallerLookup().injectDependenciesInto(installer.addAuthenticatorAnnotatedOn(this.testClass.getJavaClass())));
 
-            setAuthorizationInstaller(getInstallerLookup().injectDependenciesInto(
-                installer.addAuthorizerAnnotatedOn(this.testClass.getJavaClass())));
+            setAuthorizationInstaller(getInstallerLookup().injectDependenciesInto(installer.addAuthorizerAnnotatedOn(this.testClass.getJavaClass())));
 
-            setPersistenceMechanismInstaller(getInstallerLookup().injectDependenciesInto(
-                installer.addPersistorAnnotatedOn(this.testClass.getJavaClass())));
+            setPersistenceMechanismInstaller(getInstallerLookup().injectDependenciesInto(installer.addPersistorAnnotatedOn(this.testClass.getJavaClass())));
 
-            setUserProfileStoreInstaller(getInstallerLookup().injectDependenciesInto(
-                new InMemoryUserProfileStoreInstaller()));
+            setUserProfileStoreInstaller(getInstallerLookup().injectDependenciesInto(new InMemoryUserProfileStoreInstaller()));
 
             // fixture installer
             final FixtureInstallerAnnotatedClass fixtureInstaller = new FixtureInstallerAnnotatedClass();

Modified: incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/ServicesInstallerAnnotatedClass.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/ServicesInstallerAnnotatedClass.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/ServicesInstallerAnnotatedClass.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/main/java/org/apache/isis/viewer/junit/internal/ServicesInstallerAnnotatedClass.java Sun Jan 22 08:05:17 2012
@@ -38,8 +38,7 @@ public class ServicesInstallerAnnotatedC
         addServices(services);
     }
 
-    private void addServicesAnnotatedOn(final Class<?> testClass, final List<Object> services)
-        throws InstantiationException, IllegalAccessException {
+    private void addServicesAnnotatedOn(final Class<?> testClass, final List<Object> services) throws InstantiationException, IllegalAccessException {
         final Services servicesAnnotation = testClass.getAnnotation(Services.class);
         if (servicesAnnotation != null) {
             final Service[] serviceAnnotations = servicesAnnotation.value();
@@ -54,8 +53,7 @@ public class ServicesInstallerAnnotatedC
         }
     }
 
-    private void addServiceRepresentedBy(final Service serviceAnnotation, final List<Object> services)
-        throws InstantiationException, IllegalAccessException {
+    private void addServiceRepresentedBy(final Service serviceAnnotation, final List<Object> services) throws InstantiationException, IllegalAccessException {
         final Class<?> serviceClass = serviceAnnotation.value();
         // there's no need to unravel any Collections of services,
         // because the ServiceLoader will do it for us later.

Modified: incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/AbstractTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/AbstractTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/AbstractTest.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/AbstractTest.java Sun Jan 22 08:05:17 2012
@@ -37,10 +37,8 @@ import org.junit.Before;
 import org.junit.runner.RunWith;
 
 @RunWith(IsisTestRunner.class)
-@Fixtures({ @Fixture(CountriesFixture.class), @Fixture(ProductsFixture.class), @Fixture(CustomersFixture.class),
-    @Fixture(CustomerOrdersFixture.class) })
-@Services({ @Service(CountryRepository.class), @Service(ProductRepository.class), @Service(CustomerRepository.class),
-    @Service(OrderRepository.class) })
+@Fixtures({ @Fixture(CountriesFixture.class), @Fixture(ProductsFixture.class), @Fixture(CustomersFixture.class), @Fixture(CustomerOrdersFixture.class) })
+@Services({ @Service(CountryRepository.class), @Service(ProductRepository.class), @Service(CustomerRepository.class), @Service(OrderRepository.class) })
 public abstract class AbstractTest {
 
     protected Customer custJsDO;

Modified: incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/MemberModifyTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/MemberModifyTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/MemberModifyTest.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/MemberModifyTest.java Sun Jan 22 08:05:17 2012
@@ -193,10 +193,12 @@ public class MemberModifyTest extends Ab
     @Test
     public void cannotInvokeActionIfParameterDoesNotMatchRegularExpression() {
         try {
-            custJsWO.actionWithRegExStringParameter("abcd"); // doesn't match [0-9]{4}
+            custJsWO.actionWithRegExStringParameter("abcd"); // doesn't match
+                                                             // [0-9]{4}
             fail("InvalidRegExException should have been thrown");
         } catch (final InvalidException ex) {
-            assertThat(custJsDO.actionWithRegExStringParameterArgument, equalTo("1234")); // ie unchanged
+            assertThat(custJsDO.actionWithRegExStringParameterArgument, equalTo("1234")); // ie
+                                                                                          // unchanged
         }
     }
 
@@ -212,7 +214,8 @@ public class MemberModifyTest extends Ab
             custJsWO.actionWithMaxLengthStringParameter("abcde");
             fail("InvalidMaxLengthException should have been thrown");
         } catch (final InvalidException ex) {
-            assertThat(custJsDO.actionWithMaxLengthStringParameterArgument, equalTo("1234")); // ie unchanged
+            assertThat(custJsDO.actionWithMaxLengthStringParameterArgument, equalTo("1234")); // ie
+                                                                                              // unchanged
         }
     }
 

Modified: incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/ObjectImmutableTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/ObjectImmutableTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/ObjectImmutableTest.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/ObjectImmutableTest.java Sun Jan 22 08:05:17 2012
@@ -66,7 +66,8 @@ public class ObjectImmutableTest extends
 
     @Test
     public void removingFromCollectionOnImmutableObjectThrowsException() {
-        product355DO.addToSimilarProducts(product850DO); // TODO: can't setup, throws
+        product355DO.addToSimilarProducts(product850DO); // TODO: can't setup,
+                                                         // throws
         // ObjectPersistenceException
         try {
             product355VO.removeFromSimilarProducts(product850DO);

Modified: incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/SaveObjectsTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/SaveObjectsTest.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/SaveObjectsTest.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/SaveObjectsTest.java Sun Jan 22 08:05:17 2012
@@ -97,7 +97,8 @@ public class SaveObjectsTest extends Abs
         } catch (final InvalidException ex) {
 
             assertThat(ex.getAdvisorClass(), classEqualTo(ValidateObjectFacetViaValidateMethod.class));
-            assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false)); // not saved
+            assertThat(getDomainObjectContainer().isPersistent(newCustomer), is(false)); // not
+                                                                                         // saved
             assertThat(ex.getMessage(), equalTo("No shakes"));
         }
     }

Modified: incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Country.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Country.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Country.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Country.java Sun Jan 22 08:05:17 2012
@@ -41,7 +41,8 @@ public class Country extends AbstractDom
 
     // {{ Identification Methods
     /**
-     * Defines the title that will be displayed on the user interface in order to identity this object.
+     * Defines the title that will be displayed on the user interface in order
+     * to identity this object.
      */
     public String title() {
         final TitleBuffer t = new TitleBuffer();

Modified: incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Customer.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Customer.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Customer.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Customer.java Sun Jan 22 08:05:17 2012
@@ -41,7 +41,8 @@ public class Customer extends AbstractDo
 
     // {{ Identification Methods
     /**
-     * Defines the title that will be displayed on the user interface in order to identity this object.
+     * Defines the title that will be displayed on the user interface in order
+     * to identity this object.
      */
     public String title() {
         final TitleBuffer t = new TitleBuffer();

Modified: incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Order.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Order.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Order.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Order.java Sun Jan 22 08:05:17 2012
@@ -43,7 +43,8 @@ public class Order extends AbstractDomai
 
     // {{ Identification Methods
     /**
-     * Defines the title that will be displayed on the user interface in order to identity this object.
+     * Defines the title that will be displayed on the user interface in order
+     * to identity this object.
      */
     public String title() {
         final TitleBuffer t = new TitleBuffer();

Modified: incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Product.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Product.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Product.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/domain/Product.java Sun Jan 22 08:05:17 2012
@@ -50,7 +50,8 @@ public class Product extends AbstractDom
 
     // {{ Identification Methods
     /**
-     * Defines the title that will be displayed on the user interface in order to identity this object.
+     * Defines the title that will be displayed on the user interface in order
+     * to identity this object.
      */
     public String title() {
         final TitleBuffer t = new TitleBuffer();

Modified: incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/service/CustomerRepository.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/service/CustomerRepository.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/service/CustomerRepository.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/service/CustomerRepository.java Sun Jan 22 08:05:17 2012
@@ -100,8 +100,7 @@ public class CustomerRepository extends 
      * @return
      */
     @Hidden
-    public Customer newCustomer(final String firstName, final String lastName, final int customerNumber,
-        final Country countryOfBirth) {
+    public Customer newCustomer(final String firstName, final String lastName, final int customerNumber, final Country countryOfBirth) {
 
         final Customer customer = newCustomer();
         customer.setFirstName(firstName);

Modified: incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/service/ProductRepository.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/service/ProductRepository.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/service/ProductRepository.java (original)
+++ incubator/isis/trunk/framework/viewer/junit/src/test/java/org/apache/isis/viewer/junit/sample/service/ProductRepository.java Sun Jan 22 08:05:17 2012
@@ -87,8 +87,8 @@ public class ProductRepository extends A
      * Creates a new still transient product.
      * 
      * <p>
-     * For use by tests only. Using this rather than {@link Customer} since {@link Product} has a
-     * {@link Product#validate()} method.
+     * For use by tests only. Using this rather than {@link Customer} since
+     * {@link Product} has a {@link Product#validate()} method.
      * 
      * @return
      */

Modified: incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractElementProcessor.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractElementProcessor.java?rev=1234460&r1=1234459&r2=1234460&view=diff
==============================================================================
--- incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractElementProcessor.java (original)
+++ incubator/isis/trunk/framework/viewer/scimpi/scimpi-dispatcher/src/main/java/org/apache/isis/viewer/scimpi/dispatcher/AbstractElementProcessor.java Sun Jan 22 08:05:17 2012
@@ -27,12 +27,12 @@ public abstract class AbstractElementPro
 
     private static final String SHOW_ICONS_BY_DEFAULT = ConfigurationConstants.ROOT + "scimpi.show-icons";
 
-    private boolean showIconByDefault;
+    private final boolean showIconByDefault;
 
     public AbstractElementProcessor() {
         showIconByDefault = IsisContext.getConfiguration().getBoolean(SHOW_ICONS_BY_DEFAULT, false);
     }
-    
+
     /**
      * Return the Class for the class specified in the type attribute.
      */
@@ -48,7 +48,7 @@ public abstract class AbstractElementPro
         }
         return cls;
     }
-    
+
     protected boolean showIconByDefault() {
         return showIconByDefault;
     }



Mime
View raw message