incubator-isis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danhayw...@apache.org
Subject svn commit: r1296093 - in /incubator/isis/trunk/framework: core/commons/src/main/java/org/apache/isis/core/commons/authentication/ core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ core/metamodel/src/main/java/org/apache/isis/core/me...
Date Fri, 02 Mar 2012 08:55:37 GMT
Author: danhaywood
Date: Fri Mar  2 08:55:36 2012
New Revision: 1296093

URL: http://svn.apache.org/viewvc?rev=1296093&view=rev
Log:
ISIS-209, ISIS-188: improving back-button handling in html viewer - don't clear out actionMap
on every request (plus refactoring/reformatting tidy up); changing some tests using JMock
to use the JUnit 2.6 rule mockery; removing some unused methods

Added:
    incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ResolveState_IsDeserializableTest.java
      - copied, changed from r1243257, incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ResolveState_IsResolvableOrDeserializableTest.java
Removed:
    incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ResolveState_IsResolvableOrDeserializableTest.java
Modified:
    incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
    incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/DeweyOrderSet.java
    incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java
    incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/parseable/ParseableFacetUsingParser.java
    incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/parseable/ParseableFacetUsingParserTest.java
    incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetFactoryTest.java
    incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ImageValueSemanticsProviderAbstractTest.java
    incubator/isis/trunk/framework/core/testsupport/src/main/java/org/apache/isis/core/testsupport/jmock/JUnitRuleMockery2.java
    incubator/isis/trunk/framework/quickstart-archetype/pom.xml
    incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/TestProxyCollectionAdapter.java
    incubator/isis/trunk/framework/src/docbkx/guide/isis-contributors-guide.xml
    incubator/isis/trunk/framework/src/site/apt/downloads.apt.vm

Modified: incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java
(original)
+++ incubator/isis/trunk/framework/core/commons/src/main/java/org/apache/isis/core/commons/authentication/AuthenticationSession.java
Fri Mar  2 08:55:36 2012
@@ -19,6 +19,7 @@
 
 package org.apache.isis.core.commons.authentication;
 
+import java.io.Serializable;
 import java.util.List;
 
 import org.apache.isis.core.commons.encoding.Encodable;
@@ -26,7 +27,7 @@ import org.apache.isis.core.commons.enco
 /**
  * The representation within the system of an authenticated user.
  */
-public interface AuthenticationSession extends Encodable {
+public interface AuthenticationSession extends Encodable, Serializable {
 
     /**
      * The name of the authenticated user; for display purposes only.

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
(original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/adapter/ResolveState.java
Fri Mar  2 08:55:36 2012
@@ -270,14 +270,6 @@ public final class ResolveState {
         return false;
     }
 
-    /**
-     * @deprecated - renamed to {@link #canChangeTo(ResolveState)}.
-     */
-    @Deprecated()
-    public boolean isResolvable(final ResolveState newState) {
-        return canChangeTo(newState);
-    }
-
     public boolean isDeserializable(final ResolveState newState) {
         if (newState == null) {
             throw new ResolveException("new state must be specified");

Modified: incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/DeweyOrderSet.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/DeweyOrderSet.java?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/DeweyOrderSet.java
(original)
+++ incubator/isis/trunk/framework/core/metamodel/src/main/java/org/apache/isis/core/metamodel/layout/memberorderfacet/DeweyOrderSet.java
Fri Mar  2 08:55:36 2012
@@ -123,7 +123,7 @@ public class DeweyOrderSet extends Order
      * @param orderSetsByGroup
      * @param deweyOrderSet
      */
-    private static void ensureParentFor(final SortedMap orderSetsByGroup, final DeweyOrderSet
deweyOrderSet) {
+    private static void ensureParentFor(final SortedMap<String,DeweyOrderSet> orderSetsByGroup,
final DeweyOrderSet deweyOrderSet) {
         final String parentGroup = deweyOrderSet.getGroupPath();
         DeweyOrderSet parentOrderSet = (DeweyOrderSet) orderSetsByGroup.get(parentGroup);
         if (parentOrderSet == null) {

Copied: incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ResolveState_IsDeserializableTest.java
(from r1243257, incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ResolveState_IsResolvableOrDeserializableTest.java)
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ResolveState_IsDeserializableTest.java?p2=incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ResolveState_IsDeserializableTest.java&p1=incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ResolveState_IsResolvableOrDeserializableTest.java&r1=1243257&r2=1296093&rev=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ResolveState_IsResolvableOrDeserializableTest.java
(original)
+++ incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/adapter/ResolveState_IsDeserializableTest.java
Fri Mar  2 08:55:36 2012
@@ -46,7 +46,7 @@ import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
 
 @RunWith(Parameterized.class)
-public class ResolveState_IsResolvableOrDeserializableTest {
+public class ResolveState_IsDeserializableTest {
 
     @Parameters
     public static Collection<Object[]> data() {
@@ -107,33 +107,17 @@ public class ResolveState_IsResolvableOr
         });
     }
 
-    private final Boolean whetherIsResolvable;
     private final Boolean whetherIsDeserializable;
     private final ResolveState from;
     private final ResolveState to;
 
-    public ResolveState_IsResolvableOrDeserializableTest(final Boolean whetherIsResolvable,
final Boolean whetherIsDeserializable, final ResolveState from, final ResolveState to) {
-        this.whetherIsResolvable = whetherIsResolvable;
+    public ResolveState_IsDeserializableTest(final Boolean whetherIsResolvable, final Boolean
whetherIsDeserializable, final ResolveState from, final ResolveState to) {
         this.whetherIsDeserializable = whetherIsDeserializable;
         this.from = from;
         this.to = to;
     }
 
     @Test
-    public void testIsResolvable() {
-        if (whetherIsResolvable != null) {
-            assertThat(from.isResolvable(to), is(whetherIsResolvable));
-        } else {
-            try {
-                from.isResolvable(to);
-                fail();
-            } catch (final ResolveException ex) {
-                // expected
-            }
-        }
-    }
-
-    @Test
     public void testIsDeserialiable() {
         if (whetherIsDeserializable != null) {
             assertThat(from.isDeserializable(to), is(whetherIsDeserializable));

Modified: incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java
(original)
+++ incubator/isis/trunk/framework/core/metamodel/src/test/java/org/apache/isis/core/metamodel/specloader/specimpl/ObjectActionParameterAbstractTest_getId_and_getName.java
Fri Mar  2 08:55:36 2012
@@ -25,13 +25,10 @@ import static org.junit.Assert.assertTha
 import com.google.common.collect.Lists;
 
 import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
+import org.jmock.auto.Mock;
 import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
 import org.apache.isis.applib.filter.Filter;
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
@@ -41,10 +38,29 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.spec.Instance;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 import org.apache.isis.core.metamodel.spec.feature.ObjectActionParameter;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
 
-@RunWith(JMock.class)
 public class ObjectActionParameterAbstractTest_getId_and_getName {
 
+    @Rule
+    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
+
+    @Mock
+    private ObjectActionImpl parentAction;
+    @Mock
+    private TypedHolder actionParamPeer;
+    @Mock
+    private NamedFacet namedFacet;
+
+    @Mock
+    private ObjectSpecification stubSpecForString;
+    @Mock
+    private ObjectActionParameter stubObjectActionParameterString;
+    @Mock
+    private ObjectActionParameter stubObjectActionParameterString2;
+
+
     private final static class ObjectActionParameterAbstractToTest extends ObjectActionParameterAbstract
{
         private ObjectActionParameterAbstractToTest(final int number, final ObjectActionImpl
objectAction, final TypedHolder peer) {
             super(number, objectAction, peer);
@@ -83,46 +99,17 @@ public class ObjectActionParameterAbstra
     }
 
     private ObjectActionParameterAbstractToTest objectActionParameter;
-    private ObjectActionParameter stubObjectActionParameterString;
-    private ObjectActionParameter stubObjectActionParameterString2;
-
-    private final Mockery context = new JUnit4Mockery() {
-        {
-            setImposteriser(ClassImposteriser.INSTANCE);
-        }
-    };
-
-    private ObjectActionImpl parentAction;
-    private TypedHolder actionParamPeer;
-    private NamedFacet namedFacet;
-
-    private ObjectSpecification stubSpecForString, stubSpecForInt;
 
     @Before
     public void setUp() throws Exception {
-        parentAction = context.mock(ObjectActionImpl.class);
-        actionParamPeer = context.mock(TypedHolder.class);
-        namedFacet = context.mock(NamedFacet.class);
-
-        stubSpecForString = context.mock(ObjectSpecification.class, "specForString");
         context.checking(new Expectations() {
             {
                 allowing(stubSpecForString).getSingularName();
                 will(returnValue("string"));
-            }
-        });
 
-        stubObjectActionParameterString = context.mock(ObjectActionParameter.class, "actionParamString");
-        context.checking(new Expectations() {
-            {
                 allowing(stubObjectActionParameterString).getSpecification();
                 will(returnValue(stubSpecForString));
-            }
-        });
 
-        stubObjectActionParameterString2 = context.mock(ObjectActionParameter.class, "actionParamOtherString");
-        context.checking(new Expectations() {
-            {
                 allowing(stubObjectActionParameterString2).getSpecification();
                 will(returnValue(stubSpecForString));
             }

Modified: incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/parseable/ParseableFacetUsingParser.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/parseable/ParseableFacetUsingParser.java?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/parseable/ParseableFacetUsingParser.java
(original)
+++ incubator/isis/trunk/framework/core/progmodel/src/main/java/org/apache/isis/core/progmodel/facets/object/parseable/ParseableFacetUsingParser.java
Fri Mar  2 08:55:36 2012
@@ -41,18 +41,14 @@ import org.apache.isis.core.metamodel.in
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
 import org.apache.isis.core.metamodel.spec.ObjectSpecification;
 
-/**
- * TODO: need to fix genericity of using Parser<?>, for now suppressing
- * warnings.
- */
 public class ParseableFacetUsingParser extends FacetAbstract implements ParseableFacet {
 
-    private final Parser parser;
+    private final Parser<?> parser;
     private final DependencyInjector dependencyInjector;
     private final AdapterMap adapterMap;
     private final AuthenticationSessionProvider authenticationSessionProvider;
 
-    public ParseableFacetUsingParser(@SuppressWarnings("unchecked") final Parser parser,
final FacetHolder holder, final AuthenticationSessionProvider authenticationSessionProvider,
final DependencyInjector dependencyInjector, final AdapterMap adapterManager) {
+    public ParseableFacetUsingParser(final Parser<?> parser, final FacetHolder holder,
final AuthenticationSessionProvider authenticationSessionProvider, final DependencyInjector
dependencyInjector, final AdapterMap adapterManager) {
         super(ParseableFacet.class, holder, false);
         this.parser = parser;
         this.authenticationSessionProvider = authenticationSessionProvider;
@@ -115,13 +111,17 @@ public class ParseableFacetUsingParser e
         }
     }
 
+    /**
+     * TODO: need to fix genericity of using Parser<?>, for now suppressing
+     * warnings.
+     */
     @Override
-    @SuppressWarnings("unchecked")
+    @SuppressWarnings({ "unchecked", "rawtypes" })
     public String parseableTitle(final ObjectAdapter contextAdapter) {
         final Object pojo = AdapterUtils.unwrap(contextAdapter);
 
         getDependencyInjector().injectDependenciesInto(parser);
-        return parser.parseableTitleOf(pojo);
+        return ((Parser)parser).parseableTitleOf(pojo);
     }
 
     // /////////////////////////////////////////////////////////

Modified: incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/parseable/ParseableFacetUsingParserTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/parseable/ParseableFacetUsingParserTest.java?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/parseable/ParseableFacetUsingParserTest.java
(original)
+++ incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/parseable/ParseableFacetUsingParserTest.java
Fri Mar  2 08:55:36 2012
@@ -21,10 +21,10 @@ package org.apache.isis.core.progmodel.f
 import java.util.IllegalFormatWidthException;
 
 import org.jmock.Expectations;
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JUnit4Mockery;
-import org.jmock.lib.legacy.ClassImposteriser;
+import org.jmock.auto.Mock;
 import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Rule;
 import org.junit.Test;
 
 import org.apache.isis.applib.adapters.Parser;
@@ -36,35 +36,29 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.parseable.TextEntryParseException;
 import org.apache.isis.core.metamodel.facets.object.value.ValueFacet;
 import org.apache.isis.core.metamodel.runtimecontext.DependencyInjector;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
 
 public class ParseableFacetUsingParserTest {
 
-    protected Mockery mockery = new JUnit4Mockery() {
-        {
-            setImposteriser(ClassImposteriser.INSTANCE);
-        }
-    };
+    @Rule
+    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_AND_CLASSES);
 
+    @Mock
     private FacetHolder mockFacetHolder;
+    @Mock
     private AuthenticationSessionProvider mockAuthenticationSessionProvider;
+    @Mock
     private DependencyInjector mockDependencyInjector;
+    @Mock
     private AdapterMap mockAdapterManager;
 
     private ParseableFacetUsingParser parseableFacetUsingParser;
 
-    // private ObjectAdapter mockAdapter;
-
-    // private ObjectSpecification mockSpecification;
-
     @Before
     public void setUp() throws Exception {
 
-        mockFacetHolder = mockery.mock(FacetHolder.class);
-        mockDependencyInjector = mockery.mock(DependencyInjector.class);
-        mockAdapterManager = mockery.mock(AdapterMap.class);
-        mockAuthenticationSessionProvider = mockery.mock(AuthenticationSessionProvider.class);
-
-        mockery.checking(new Expectations() {
+        context.checking(new Expectations() {
             {
                 never(mockAuthenticationSessionProvider);
                 never(mockAdapterManager);
@@ -76,7 +70,7 @@ public class ParseableFacetUsingParserTe
             }
         });
 
-        final Parser parser = new Parser<String>() {
+        final Parser<String> parser = new Parser<String>() {
             @Override
             public String parseTextEntry(final Object contextPojo, final String entry) {
                 if (entry.equals("invalid")) {
@@ -112,11 +106,9 @@ public class ParseableFacetUsingParserTe
             }
         };
         parseableFacetUsingParser = new ParseableFacetUsingParser(parser, mockFacetHolder,
mockAuthenticationSessionProvider, mockDependencyInjector, mockAdapterManager);
-
-        // mockAdapter = mockery.mock(ObjectAdapter.class);
-        // mockSpecification = mockery.mock(ObjectSpecification.class);
     }
 
+    @Ignore
     @Test
     public void testParseNormalEntry() throws Exception {
         // TODO why is this so complicated to check!!!

Modified: incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetFactoryTest.java?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetFactoryTest.java
(original)
+++ incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/object/value/ValueFacetFactoryTest.java
Fri Mar  2 08:55:36 2012
@@ -34,7 +34,6 @@ import org.apache.isis.core.metamodel.fa
 import org.apache.isis.core.metamodel.facets.object.title.TitleFacet;
 import org.apache.isis.core.metamodel.facets.object.value.ValueFacet;
 import org.apache.isis.core.metamodel.facets.typicallen.TypicalLengthFacet;
-import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.progmodel.facets.AbstractFacetFactoryTest;
 import org.apache.isis.core.progmodel.facets.object.defaults.DefaultedFacet;
 import org.apache.isis.core.progmodel.facets.object.value.annotation.ValueFacetAnnotation;
@@ -44,7 +43,6 @@ public class ValueFacetFactoryTest exten
 
     private ValueFacetFactory facetFactory;
     private IsisConfigurationDefault isisConfigurationDefault;
-    private RuntimeContext runtimeContext;
 
     @Override
     protected void setUp() throws Exception {

Modified: incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ImageValueSemanticsProviderAbstractTest.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ImageValueSemanticsProviderAbstractTest.java?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ImageValueSemanticsProviderAbstractTest.java
(original)
+++ incubator/isis/trunk/framework/core/progmodel/src/test/java/org/apache/isis/core/progmodel/facets/value/ImageValueSemanticsProviderAbstractTest.java
Fri Mar  2 08:55:36 2012
@@ -23,27 +23,34 @@ import static org.junit.Assert.assertEqu
 
 import java.awt.Image;
 
-import org.jmock.Mockery;
-import org.jmock.integration.junit4.JMock;
-import org.jmock.integration.junit4.JUnit4Mockery;
+import org.jmock.auto.Mock;
+import org.junit.Before;
+import org.junit.Rule;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
 import org.apache.isis.core.metamodel.adapter.ObjectAdapter;
 import org.apache.isis.core.metamodel.facetapi.FacetHolder;
-import org.apache.isis.core.metamodel.runtimecontext.RuntimeContext;
 import org.apache.isis.core.progmodel.facets.value.image.ImageValueSemanticsProviderAbstract;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2;
+import org.apache.isis.core.testsupport.jmock.JUnitRuleMockery2.Mode;
 
-@RunWith(JMock.class)
 public class ImageValueSemanticsProviderAbstractTest {
 
-    protected Mockery mockery = new JUnit4Mockery();
+    @Rule
+    public JUnitRuleMockery2 context = JUnitRuleMockery2.createFor(Mode.INTERFACES_ONLY);
 
+    @Mock
+    private FacetHolder mockFacetHolder;
+
+    private TestImageSemanticsProvider adapter;
+
+    @Before
+    public void setUp() throws Exception {
+        adapter = new TestImageSemanticsProvider(mockFacetHolder);
+    }
+    
     @Test
     public void testImageData() throws Exception {
-        final RuntimeContext mockRuntimeContext = mockery.mock(RuntimeContext.class);
-        final FacetHolder mockFacetHolder = mockery.mock(FacetHolder.class);
-        final TestImageSemanticsProvider adapter = new TestImageSemanticsProvider(mockFacetHolder);
 
         final String data = adapter.toEncodedString(null);
         final int[][] array = adapter.doRestore(data);

Modified: incubator/isis/trunk/framework/core/testsupport/src/main/java/org/apache/isis/core/testsupport/jmock/JUnitRuleMockery2.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/core/testsupport/src/main/java/org/apache/isis/core/testsupport/jmock/JUnitRuleMockery2.java?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/core/testsupport/src/main/java/org/apache/isis/core/testsupport/jmock/JUnitRuleMockery2.java
(original)
+++ incubator/isis/trunk/framework/core/testsupport/src/main/java/org/apache/isis/core/testsupport/jmock/JUnitRuleMockery2.java
Fri Mar  2 08:55:36 2012
@@ -98,28 +98,4 @@ public class JUnitRuleMockery2 extends J
         });
         return mock;
     }
-
-    public <T> T mockAndIgnoring(final Class<T> typeToMock) {
-        return ignoring(mock(typeToMock));
-    }
-
-    public <T> T mockAndIgnoring(final Class<T> typeToMock, final String name)
{
-        return ignoring(mock(typeToMock, name));
-    }
-
-    public <T> T mockAndAllowing(final Class<T> typeToMock) {
-        return allowing(mock(typeToMock));
-    }
-
-    public <T> T mockAndAllowing(final Class<T> typeToMock, final String name)
{
-        return allowing(mock(typeToMock, name));
-    }
-
-    public <T> T mockAndNever(final Class<T> typeToMock) {
-        return never(mock(typeToMock));
-    }
-
-    public <T> T mockAndNever(final Class<T> typeToMock, final String name) {
-        return never(mock(typeToMock, name));
-    }
 }

Modified: incubator/isis/trunk/framework/quickstart-archetype/pom.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/quickstart-archetype/pom.xml?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/quickstart-archetype/pom.xml (original)
+++ incubator/isis/trunk/framework/quickstart-archetype/pom.xml Fri Mar  2 08:55:36 2012
@@ -26,7 +26,6 @@
       <version>0.3.0-incubating-SNAPSHOT</version>
   </parent>
 
-  <groupId>org.apache.isis</groupId>
   <artifactId>quickstart-archetype</artifactId>
   <packaging>maven-archetype</packaging>
 

Modified: incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/TestProxyCollectionAdapter.java
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/TestProxyCollectionAdapter.java?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/TestProxyCollectionAdapter.java
(original)
+++ incubator/isis/trunk/framework/runtimes/dflt/runtime/src/test/java/org/apache/isis/runtimes/dflt/runtime/testsystem/TestProxyCollectionAdapter.java
Fri Mar  2 08:55:36 2012
@@ -25,6 +25,8 @@ import java.util.Iterator;
 import java.util.List;
 import java.util.Vector;
 
+import com.google.common.collect.Iterables;
+
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.collections.EnumerationUtils;
 import org.apache.commons.collections.iterators.IteratorEnumeration;
@@ -344,8 +346,11 @@ class TestProxyCollectionFacet implement
     }
 
     @Override
-    public Iterator<ObjectAdapter> iterator(final ObjectAdapter wrappedCollection)
{
-        throw new NotYetImplementedException();
+    public Iterator<ObjectAdapter> iterator(final ObjectAdapter collection) {
+        final TestProxyCollectionAdapter collectionDowncasted = collectionDowncasted(collection);
+        final List list = EnumerationUtils.toList(collectionDowncasted.elements());
+        final Collection transformedCollection = CollectionUtils.collect(list, new ObjectToAdapterTransformer());
+        return transformedCollection.iterator();
     }
 
     @Override
@@ -355,7 +360,13 @@ class TestProxyCollectionFacet implement
 
     @Override
     public Iterable<ObjectAdapter> iterable(final ObjectAdapter collectionAdapter)
{
-        throw new NotYetImplementedException();
+        return new Iterable<ObjectAdapter>() {
+            
+            @Override
+            public Iterator<ObjectAdapter> iterator() {
+                return TestProxyCollectionFacet.this.iterator(collectionAdapter);
+            }
+        };
     }
 
     @Override

Modified: incubator/isis/trunk/framework/src/docbkx/guide/isis-contributors-guide.xml
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/src/docbkx/guide/isis-contributors-guide.xml?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/src/docbkx/guide/isis-contributors-guide.xml (original)
+++ incubator/isis/trunk/framework/src/docbkx/guide/isis-contributors-guide.xml Fri Mar  2
08:55:36 2012
@@ -5104,7 +5104,14 @@ Please verify the release and cast your 
           signature file from the staging repo, and the dist directory already
           exists, use scp to copy the files up:</para>
 
-          <programlisting>scp isis-x.x.x-incubating-source-release.* people.apache.org:/www/www.apache.org/dist/incubator/isis/.</programlisting>
+          <programlisting>scp isis-x.x.x-incubating-source-release.* people.apache.org:/www/www.apache.org/dist/incubator/isis/x.x.x-incubating/.</programlisting>
+
+          <para>Then, ssh onto people.apache.org and confirm the permissions
+          are set correctly:</para>
+
+          <programlisting>ssh people.apache.org
+cd /www/www.apache.org/dist/incubator/isis/x.x.x-incubating/
+chmod 644 *</programlisting>
         </sect2>
 
         <sect2 id="sec.PromoteAndUpdateWebsite">

Modified: incubator/isis/trunk/framework/src/site/apt/downloads.apt.vm
URL: http://svn.apache.org/viewvc/incubator/isis/trunk/framework/src/site/apt/downloads.apt.vm?rev=1296093&r1=1296092&r2=1296093&view=diff
==============================================================================
--- incubator/isis/trunk/framework/src/site/apt/downloads.apt.vm (original)
+++ incubator/isis/trunk/framework/src/site/apt/downloads.apt.vm Fri Mar  2 08:55:36 2012
@@ -45,7 +45,7 @@ Release Notes
 
  A list of JIRA issues addressed in this release can be found {{{./release-notes-${project.version}.html}here}}.
  
- Previous release: {{{./release-notes-0.1.2-incubating.html}0.1.2-incubating}}).
+ Previous releases: {{{./release-notes-0.1.2-incubating.html}0.1.2-incubating}}.
 
 
 Building Isis yourself
@@ -66,4 +66,4 @@ Icons
   
  In addition to the source and binary releases, there are also a number of {{{./icons.html}icon
sets}} you can use in your own applications.
  
-   
\ No newline at end of file
+   



Mime
View raw message