incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1234388 [4/4] - in /incubator/isis/trunk/framework/applib/src: main/java/org/apache/isis/applib/ main/java/org/apache/isis/applib/adapters/ main/java/org/apache/isis/applib/annotation/ main/java/org/apache/isis/applib/clock/ main/java/org/...
Date Sat, 21 Jan 2012 18:30:35 GMT
Modified: incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/events/InteractionEventTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/events/InteractionEventTest.java?rev=1234388&r1=1234387&r2=1234388&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/events/InteractionEventTest.java
(original)
+++ incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/events/InteractionEventTest.java
Sat Jan 21 18:30:32 2012
@@ -24,6 +24,7 @@ import static org.hamcrest.CoreMatchers.
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
 
+import org.apache.isis.applib.Identifier;
 import org.jmock.Mockery;
 import org.jmock.integration.junit4.JMock;
 import org.jmock.integration.junit4.JUnit4Mockery;
@@ -31,8 +32,6 @@ import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import org.apache.isis.applib.Identifier;
-
 @RunWith(JMock.class)
 public class InteractionEventTest {
 
@@ -49,8 +48,7 @@ public class InteractionEventTest {
     @Before
     public void setUp() {
         source = new Object();
-        identifier =
-            Identifier.actionIdentifier("CustomerOrder", "cancelOrder", new Class[] { String.class,
boolean.class });
+        identifier = Identifier.actionIdentifier("CustomerOrder", "cancelOrder", new Class[]
{ String.class, boolean.class });
         advisorClass = this.getClass();
     }
 

Modified: incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/fixtures/FixtureClockInstantiationTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/fixtures/FixtureClockInstantiationTest.java?rev=1234388&r1=1234387&r2=1234388&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/fixtures/FixtureClockInstantiationTest.java
(original)
+++ incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/fixtures/FixtureClockInstantiationTest.java
Sat Jan 21 18:30:32 2012
@@ -22,11 +22,10 @@ package org.apache.isis.applib.fixtures;
 import static org.hamcrest.CoreMatchers.is;
 import static org.junit.Assert.assertThat;
 
+import org.apache.isis.applib.clock.Clock;
 import org.junit.Before;
 import org.junit.Test;
 
-import org.apache.isis.applib.clock.Clock;
-
 public class FixtureClockInstantiationTest {
 
     @Before

Modified: incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/spec/SpecificationAbstractTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/spec/SpecificationAbstractTest.java?rev=1234388&r1=1234387&r2=1234388&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/spec/SpecificationAbstractTest.java
(original)
+++ incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/spec/SpecificationAbstractTest.java
Sat Jan 21 18:30:32 2012
@@ -24,10 +24,9 @@ import static org.hamcrest.CoreMatchers.
 import static org.hamcrest.CoreMatchers.nullValue;
 import static org.junit.Assert.assertThat;
 
-import org.junit.Test;
-
 import org.apache.isis.applib.spec.AbstractSpecification.Nullability;
 import org.apache.isis.applib.spec.AbstractSpecification.TypeChecking;
+import org.junit.Test;
 
 public class SpecificationAbstractTest {
 
@@ -52,13 +51,12 @@ public class SpecificationAbstractTest {
 
     @Test
     public void shouldNotSatisfyForNullIfConfiguredAsSuch() {
-        specAbstractSomeDomainObject =
-            new AbstractSpecification<SomeDomainObject>(Nullability.ENSURE_NOT_NULL,
TypeChecking.IGNORE_INCORRECT_TYPE) {
-                @Override
-                public String satisfiesSafely(final SomeDomainObject obj) {
-                    return null;
-                }
-            };
+        specAbstractSomeDomainObject = new AbstractSpecification<SomeDomainObject>(Nullability.ENSURE_NOT_NULL,
TypeChecking.IGNORE_INCORRECT_TYPE) {
+            @Override
+            public String satisfiesSafely(final SomeDomainObject obj) {
+                return null;
+            }
+        };
         assertThat(specAbstractSomeDomainObject.satisfies(null), is(not(nullValue())));
     }
 
@@ -75,25 +73,23 @@ public class SpecificationAbstractTest {
 
     @Test
     public void shouldNotSatisfyForIncorrectTypeIfConfiguredAsSuch() {
-        specAbstractSomeDomainObject =
-            new AbstractSpecification<SomeDomainObject>(Nullability.IGNORE_IF_NULL,
TypeChecking.ENSURE_CORRECT_TYPE) {
-                @Override
-                public String satisfiesSafely(final SomeDomainObject obj) {
-                    return null;
-                }
-            };
+        specAbstractSomeDomainObject = new AbstractSpecification<SomeDomainObject>(Nullability.IGNORE_IF_NULL,
TypeChecking.ENSURE_CORRECT_TYPE) {
+            @Override
+            public String satisfiesSafely(final SomeDomainObject obj) {
+                return null;
+            }
+        };
         assertThat(specAbstractSomeDomainObject.satisfies(new SomeOtherDomainObject()), is(not(nullValue())));
     }
 
     @Test
     public void shouldSatisfyForNonNullCorrectTypeIfConfiguredAsSuch() {
-        specAbstractSomeDomainObject =
-            new AbstractSpecification<SomeDomainObject>(Nullability.ENSURE_NOT_NULL,
TypeChecking.ENSURE_CORRECT_TYPE) {
-                @Override
-                public String satisfiesSafely(final SomeDomainObject obj) {
-                    return null;
-                }
-            };
+        specAbstractSomeDomainObject = new AbstractSpecification<SomeDomainObject>(Nullability.ENSURE_NOT_NULL,
TypeChecking.ENSURE_CORRECT_TYPE) {
+            @Override
+            public String satisfiesSafely(final SomeDomainObject obj) {
+                return null;
+            }
+        };
         assertThat(specAbstractSomeDomainObject.satisfies(new SomeDomainObject()), is(nullValue()));
     }
 

Modified: incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/value/DateTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/value/DateTest.java?rev=1234388&r1=1234387&r2=1234388&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/value/DateTest.java
(original)
+++ incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/value/DateTest.java
Sat Jan 21 18:30:32 2012
@@ -83,7 +83,8 @@ public class DateTest {
     @Test
     public void testSameDayOfWeekAs() throws Exception {
         assertTrue(new Date(2000, 2, 17).sameDayOfWeekAs(new Date(2003, 8, 7))); // Thursday
-        assertFalse(new Date(2000, 2, 15).sameDayOfWeekAs(new Date(2003, 8, 17))); // Tues
&
+        assertFalse(new Date(2000, 2, 15).sameDayOfWeekAs(new Date(2003, 8, 17))); // Tues
+                                                                                   // &
     }
 
     @Test
@@ -95,14 +96,26 @@ public class DateTest {
     @Test
     public void testSameDayOfYearAs() throws Exception {
         assertTrue(new Date(2001, 8, 17).sameDayOfYearAs(new Date(2003, 8, 17)));
-        assertTrue(new Date(1999, 3, 1).sameDayOfYearAs(new Date(2000, 2, 29))); // leap
year
+        assertTrue(new Date(1999, 3, 1).sameDayOfYearAs(new Date(2000, 2, 29))); // leap
+                                                                                 // year
         assertFalse(new Date(2001, 3, 1).sameDayOfYearAs(new Date(2000, 3, 2)));
     }
 
     @Test
     public void testSameWeekAs() throws Exception {
-        assertFalse(new Date(2000, 2, 15).sameWeekAs(new Date(2000, 2, 12))); // Tue, week
7 and Sat, week 6
-        assertTrue(new Date(2001, 2, 16).sameWeekAs(new Date(2002, 2, 11))); // Tue, week
7, and Thu, week
+        assertFalse(new Date(2000, 2, 15).sameWeekAs(new Date(2000, 2, 12))); // Tue,
+                                                                              // week
+                                                                              // 7
+                                                                              // and
+                                                                              // Sat,
+                                                                              // week
+                                                                              // 6
+        assertTrue(new Date(2001, 2, 16).sameWeekAs(new Date(2002, 2, 11))); // Tue,
+                                                                             // week
+                                                                             // 7,
+                                                                             // and
+                                                                             // Thu,
+                                                                             // week
         // 7
     }
 
@@ -124,7 +137,7 @@ public class DateTest {
         assertEquals(1970, date.getYear());
         assertEquals(1, date.getMonth());
         assertEquals(1, date.getDay());
-        java.util.Date dateValue = date.dateValue();
+        final java.util.Date dateValue = date.dateValue();
         final long time = dateValue.getTime();
         assertEquals(1000 * 60 * 60 * 12 * 0, time);
     }

Modified: incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/value/DateTimeTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/value/DateTimeTest.java?rev=1234388&r1=1234387&r2=1234388&view=diff
==============================================================================
--- incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/value/DateTimeTest.java
(original)
+++ incubator/isis/trunk/framework/applib/src/test/java/org/apache/isis/applib/value/DateTimeTest.java
Sat Jan 21 18:30:32 2012
@@ -73,7 +73,7 @@ public class DateTimeTest {
 
     @Test
     public void testAdd() {
-        DateTime resultDateTime = actual.add(1, 2, 3);
+        final DateTime resultDateTime = actual.add(1, 2, 3);
         assertEquals(17, resultDateTime.getDay());
         assertEquals(5, resultDateTime.getMonth());
         assertEquals(2001, resultDateTime.getYear());
@@ -95,7 +95,8 @@ public class DateTimeTest {
     @Test
     public void testSameDayOfWeekAs() throws Exception {
         assertTrue(new DateTime(2000, 2, 17).sameDayOfWeekAs(new DateTime(2003, 8, 7)));
// Thursday
-        assertFalse(new DateTime(2000, 2, 15).sameDayOfWeekAs(new DateTime(2003, 8, 17)));
// Tues &
+        assertFalse(new DateTime(2000, 2, 15).sameDayOfWeekAs(new DateTime(2003, 8, 17)));
// Tues
+                                                                                        
  // &
     }
 
     @Test
@@ -107,15 +108,24 @@ public class DateTimeTest {
     @Test
     public void testSameDayOfYearAs() throws Exception {
         assertTrue(new DateTime(2001, 8, 17).sameDayOfYearAs(new DateTime(2003, 8, 17)));
-        assertTrue(new DateTime(1999, 3, 1).sameDayOfYearAs(new DateTime(2000, 2, 29)));
// leap year
+        assertTrue(new DateTime(1999, 3, 1).sameDayOfYearAs(new DateTime(2000, 2, 29)));
// leap
+                                                                                        
// year
         assertFalse(new DateTime(2001, 3, 1).sameDayOfYearAs(new DateTime(2000, 3, 2)));
     }
 
     @Test
     public void testSameWeekAs() throws Exception {
-        assertFalse(new DateTime(2000, 2, 15).sameWeekAs(new DateTime(2000, 2, 12))); //
Tue, week 7 and Sat,
+        assertFalse(new DateTime(2000, 2, 15).sameWeekAs(new DateTime(2000, 2, 12))); //
Tue,
+                                                                                      //
week
+                                                                                      //
7
+                                                                                      //
and
+                                                                                      //
Sat,
         // week 6
-        assertTrue(new DateTime(2001, 2, 16).sameWeekAs(new DateTime(2002, 2, 11))); // Tue,
week 7, and Thu,
+        assertTrue(new DateTime(2001, 2, 16).sameWeekAs(new DateTime(2002, 2, 11))); // Tue,
+                                                                                     // week
+                                                                                     // 7,
+                                                                                     // and
+                                                                                     // Thu,
         // week 7
     }
 



Mime
View raw message