tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hls...@apache.org
Subject svn commit: r583192 [4/4] - in /tapestry/tapestry5/trunk: tapestry-core/src/main/java/org/apache/tapestry/ tapestry-core/src/main/java/org/apache/tapestry/annotations/ tapestry-core/src/main/java/org/apache/tapestry/corelib/base/ tapestry-core/src/main...
Date Tue, 09 Oct 2007 15:22:37 GMT
Added: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/RedGreeterImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/RedGreeterImpl.java?rev=583192&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/RedGreeterImpl.java
(added)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/RedGreeterImpl.java
Tue Oct  9 08:22:27 2007
@@ -0,0 +1,28 @@
+// Copyright 2007 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry.ioc;
+
+import org.apache.tapestry.ioc.annotations.Marker;
+
+@Marker(RedMarker.class)
+public class RedGreeterImpl implements Greeter
+{
+
+    public String getGreeting()
+    {
+        return null;
+    }
+
+}

Added: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/RedMarker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/RedMarker.java?rev=583192&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/RedMarker.java
(added)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/RedMarker.java
Tue Oct  9 08:22:27 2007
@@ -0,0 +1,32 @@
+// Copyright 2007 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry.ioc;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@Target(
+{ PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface RedMarker
+{
+
+}

Added: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/UnknownColorGreeterImpl.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/UnknownColorGreeterImpl.java?rev=583192&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/UnknownColorGreeterImpl.java
(added)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/UnknownColorGreeterImpl.java
Tue Oct  9 08:22:27 2007
@@ -0,0 +1,25 @@
+// Copyright 2007 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry.ioc;
+
+public class UnknownColorGreeterImpl implements Greeter
+{
+
+    public String getGreeting()
+    {
+        return null;
+    }
+
+}

Added: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/YellowMarker.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/YellowMarker.java?rev=583192&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/YellowMarker.java
(added)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/YellowMarker.java
Tue Oct  9 08:22:27 2007
@@ -0,0 +1,32 @@
+// Copyright 2007 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry.ioc;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+@Target(
+{ PARAMETER, FIELD })
+@Retention(RUNTIME)
+@Documented
+public @interface YellowMarker
+{
+
+}

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ContributionDefImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ContributionDefImplTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ContributionDefImplTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ContributionDefImplTest.java
Tue Oct  9 08:22:27 2007
@@ -23,8 +23,8 @@
 import org.apache.tapestry.ioc.Configuration;
 import org.apache.tapestry.ioc.MappedConfiguration;
 import org.apache.tapestry.ioc.ModuleBuilderSource;
-import org.apache.tapestry.ioc.OrderedConfiguration;
 import org.apache.tapestry.ioc.ObjectLocator;
+import org.apache.tapestry.ioc.OrderedConfiguration;
 import org.apache.tapestry.ioc.annotations.InjectService;
 import org.apache.tapestry.ioc.def.ContributionDef;
 import org.apache.tapestry.ioc.test.IOCTestCase;

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/DefaultModuleDefImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/DefaultModuleDefImplTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/DefaultModuleDefImplTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/DefaultModuleDefImplTest.java
Tue Oct  9 08:22:27 2007
@@ -22,8 +22,11 @@
 import java.util.Set;
 
 import org.apache.tapestry.ioc.AutobuildModule;
+import org.apache.tapestry.ioc.BlueMarker;
 import org.apache.tapestry.ioc.IOCConstants;
+import org.apache.tapestry.ioc.MarkerModule;
 import org.apache.tapestry.ioc.ObjectCreator;
+import org.apache.tapestry.ioc.RedMarker;
 import org.apache.tapestry.ioc.ServiceBuilderResources;
 import org.apache.tapestry.ioc.StringHolder;
 import org.apache.tapestry.ioc.def.ContributionDef;
@@ -86,6 +89,7 @@
         assertTrue(sd.toString().contains(className + ".buildFred()"));
         assertEquals(sd.getServiceScope(), IOCConstants.DEFAULT_SCOPE);
         assertEquals(sd.isEagerLoad(), false);
+        assertNull(sd.getMarker());
 
         sd = md.getServiceDef("Wilma");
         assertEquals(sd.isEagerLoad(), true);
@@ -501,6 +505,70 @@
         ServiceDef sd = md.getServiceDef("Runnable");
 
         assertTrue(sd.isEagerLoad());
+
+        verify();
+    }
+
+    @Test
+    public void service_builder_method_has_marker_annotation()
+    {
+        Logger logger = mockLogger();
+
+        replay();
+
+        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, _classFactory);
+
+        ServiceDef sd = md.getServiceDef("Greeter");
+
+        assertEquals(sd.getMarker(), BlueMarker.class);
+
+        verify();
+    }
+
+    @Test
+    public void bound_service_has_marker_annotation()
+    {
+        Logger logger = mockLogger();
+
+        replay();
+
+        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, _classFactory);
+
+        ServiceDef sd = md.getServiceDef("RedGreeter");
+
+        assertEquals(sd.getMarker(), RedMarker.class);
+
+        verify();
+    }
+
+    @Test
+    public void bound_service_explicit_marker()
+    {
+        Logger logger = mockLogger();
+
+        replay();
+
+        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, _classFactory);
+
+        ServiceDef sd = md.getServiceDef("SecondRedGreeter");
+
+        assertEquals(sd.getMarker(), RedMarker.class);
+
+        verify();
+    }
+
+    @Test
+    public void explicit_marker_overrides_marker_annotation()
+    {
+        Logger logger = mockLogger();
+
+        replay();
+
+        ModuleDef md = new DefaultModuleDefImpl(MarkerModule.class, logger, _classFactory);
+
+        ServiceDef sd = md.getServiceDef("SurprisinglyBlueGreeter");
+
+        assertEquals(sd.getMarker(), BlueMarker.class);
 
         verify();
     }

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/GlobPatternMatcherTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/GlobPatternMatcherTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/GlobPatternMatcherTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/GlobPatternMatcherTest.java
Tue Oct  9 08:22:27 2007
@@ -14,10 +14,10 @@
 
 package org.apache.tapestry.ioc.internal;
 
-import static org.testng.Assert.assertFalse;
-import static org.testng.Assert.assertTrue;
-
-import org.testng.annotations.Test;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertTrue;
+
+import org.testng.annotations.Test;
 
 /**
  * 

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ReadManifest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ReadManifest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ReadManifest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ReadManifest.java
Tue Oct  9 08:22:27 2007
@@ -14,17 +14,17 @@
 
 package org.apache.tapestry.ioc.internal;
 
-import static java.lang.String.format;
+import static java.lang.String.format;
 import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
-
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Collections;
-import java.util.Enumeration;
-import java.util.List;
-import java.util.Map;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
+
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.List;
+import java.util.Map;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
 
 public class ReadManifest
 {

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/RecursiveServiceCreationCheckWrapperTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/RecursiveServiceCreationCheckWrapperTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/RecursiveServiceCreationCheckWrapperTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/RecursiveServiceCreationCheckWrapperTest.java
Tue Oct  9 08:22:27 2007
@@ -32,7 +32,7 @@
         ObjectCreator delegate = mockObjectCreator();
         Object service = new Object();
 
-        ServiceDef def = new ServiceDefImpl(Runnable.class, "Bar", "singleton", false, source);
+        ServiceDef def = new ServiceDefImpl(Runnable.class, "Bar", null, "singleton", false,
source);
 
         train_createObject(delegate, service);
 
@@ -70,7 +70,7 @@
         ObjectCreator delegate = mockObjectCreator();
         Object service = new Object();
 
-        ServiceDef def = new ServiceDefImpl(Runnable.class, "Bar", "singleton", false, source);
+        ServiceDef def = new ServiceDefImpl(Runnable.class, "Bar", null, "singleton", false,
source);
 
         expect(delegate.createObject()).andThrow(failure);
 

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorFixture.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorFixture.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorFixture.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceDecoratorFixture.java
Tue Oct  9 08:22:27 2007
@@ -14,7 +14,7 @@
 
 package org.apache.tapestry.ioc.internal;
 
-import org.testng.Assert;
+import org.testng.Assert;
 
 /**
  * Used by {@link org.apache.tapestry.ioc.internal.ServiceDecoratorImplTest}.

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionTrackerImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionTrackerImplTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionTrackerImplTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionTrackerImplTest.java
Tue Oct  9 08:22:27 2007
@@ -14,9 +14,9 @@
 
 package org.apache.tapestry.ioc.internal.services;
 
-import org.apache.tapestry.ioc.services.ExceptionTracker;
-import org.testng.Assert;
-import org.testng.annotations.Test;
+import org.apache.tapestry.ioc.services.ExceptionTracker;
+import org.testng.Assert;
+import org.testng.annotations.Test;
 
 /**
  * 

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentBarrierTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentBarrierTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentBarrierTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentBarrierTest.java
Tue Oct  9 08:22:27 2007
@@ -18,7 +18,6 @@
 
 import java.util.List;
 
-import org.apache.tapestry.ioc.internal.util.ConcurrentBarrier;
 import org.apache.tapestry.ioc.test.TestBase;
 import org.testng.annotations.Test;
 

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTarget.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTarget.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTarget.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTarget.java
Tue Oct  9 08:22:27 2007
@@ -14,8 +14,6 @@
 
 package org.apache.tapestry.ioc.internal.util;
 
-import org.apache.tapestry.ioc.internal.util.ConcurrentBarrier;
-
 import java.util.concurrent.TimeUnit;
 
 public class ConcurrentTarget

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTargetWrapper.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTargetWrapper.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTargetWrapper.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/ConcurrentTargetWrapper.java
Tue Oct  9 08:22:27 2007
@@ -14,7 +14,6 @@
 
 package org.apache.tapestry.ioc.internal.util;
 
-import org.apache.tapestry.ioc.internal.util.ConcurrentBarrier;
 
 public class ConcurrentTargetWrapper implements Runnable
 {

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/DefenseTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/DefenseTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/DefenseTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/DefenseTest.java
Tue Oct  9 08:22:27 2007
@@ -17,10 +17,9 @@
 import static org.apache.tapestry.ioc.internal.util.Defense.cast;
 import static org.apache.tapestry.ioc.internal.util.Defense.notBlank;
 import static org.apache.tapestry.ioc.internal.util.Defense.notNull;
-
-import org.apache.tapestry.ioc.internal.util.Defense;
+
 import org.apache.tapestry.ioc.test.TestBase;
-import org.testng.annotations.Test;
+import org.testng.annotations.Test;
 
 public class DefenseTest extends TestBase
 {

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/IdAllocatorTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/IdAllocatorTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/IdAllocatorTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/IdAllocatorTest.java
Tue Oct  9 08:22:27 2007
@@ -15,12 +15,11 @@
 package org.apache.tapestry.ioc.internal.util;
 
 import static org.apache.tapestry.ioc.internal.util.CollectionFactory.newList;
-
-import java.util.List;
-
-import org.apache.tapestry.ioc.internal.util.IdAllocator;
-import org.testng.Assert;
-import org.testng.annotations.Test;
+
+import java.util.List;
+
+import org.testng.Assert;
+import org.testng.annotations.Test;
 
 public class IdAllocatorTest extends Assert
 {

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/InternalUtilsTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/InternalUtilsTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/InternalUtilsTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/InternalUtilsTest.java
Tue Oct  9 08:22:27 2007
@@ -287,4 +287,18 @@
 
         assertEquals(InternalUtils.lastTerm("fie.fie.foe.fum"), "fum");
     }
+
+    @Test
+    public void add_to_list_map()
+    {
+        Map<String, List<Integer>> map = CollectionFactory.newMap();
+
+        InternalUtils.addToMapList(map, "fred", 1);
+
+        assertEquals(map.get("fred"), Arrays.asList(1));
+
+        InternalUtils.addToMapList(map, "fred", 2);
+
+        assertEquals(map.get("fred"), Arrays.asList(1, 2));
+    }
 }

Modified: tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OneShotLockSubject.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OneShotLockSubject.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OneShotLockSubject.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-ioc/src/test/java/org/apache/tapestry/ioc/internal/util/OneShotLockSubject.java
Tue Oct  9 08:22:27 2007
@@ -17,7 +17,6 @@
  */
 package org.apache.tapestry.ioc.internal.util;
 
-import org.apache.tapestry.ioc.internal.util.OneShotLock;
 
 /**
  * Evolved from a test for aspects + annotations to a test of a class that utilizeds OneShotLock
as

Modified: tapestry/tapestry5/trunk/tapestry-spring/src/main/java/org/apache/tapestry/internal/spring/SpringModuleDef.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-spring/src/main/java/org/apache/tapestry/internal/spring/SpringModuleDef.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-spring/src/main/java/org/apache/tapestry/internal/spring/SpringModuleDef.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-spring/src/main/java/org/apache/tapestry/internal/spring/SpringModuleDef.java
Tue Oct  9 08:22:27 2007
@@ -92,6 +92,13 @@
                 {
                     return false;
                 }
+
+                /** Returns null, Spring has no concept of a marker annotation. */
+                public Class getMarker()
+                {
+                    return null;
+                }
+
             };
 
             _serviceDefs.put(beanName, serviceDef);
@@ -132,6 +139,13 @@
             {
                 return false;
             }
+
+            /** Returns null. */
+            public Class getMarker()
+            {
+                return null;
+            }
+
         };
 
         _serviceDefs.put(CONTEXT_SERVICE_ID, serviceDef);

Modified: tapestry/tapestry5/trunk/tapestry-spring/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-spring/src/site/apt/index.apt?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-spring/src/site/apt/index.apt (original)
+++ tapestry/tapestry5/trunk/tapestry-spring/src/site/apt/index.apt Tue Oct  9 08:22:27 2007
@@ -68,7 +68,7 @@
 * Injecting beans
 
   Inside your component classes, you may use the 
-  {{{http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/annotations/Inject.html}Inject}}
annotation.  Typically, just the field 
+  {{{http://tapestry.apache.org/tapestry5/tapestry-core/apidocs/org/apache/tapestry/ioc/annotations/Inject.html}Inject}}
annotation.  Typically, just the field 
   type is sufficient to identify the Spring bean to inject:
   
 +----+

Modified: tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/example/testapp/pages/Start.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/example/testapp/pages/Start.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/example/testapp/pages/Start.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-spring/src/test/java/org/example/testapp/pages/Start.java
Tue Oct  9 08:22:27 2007
@@ -16,8 +16,8 @@
 
 import java.util.Arrays;
 
-import org.apache.tapestry.annotations.Inject;
 import org.apache.tapestry.annotations.Retain;
+import org.apache.tapestry.ioc.annotations.Inject;
 import org.apache.tapestry.ioc.internal.util.InternalUtils;
 import org.example.testapp.services.Upcase;
 import org.springframework.web.context.WebApplicationContext;

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/components/Upload.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/components/Upload.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/components/Upload.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/components/Upload.java
Tue Oct  9 08:22:27 2007
@@ -24,9 +24,9 @@
 import org.apache.tapestry.ValidationException;
 import org.apache.tapestry.ValidationTracker;
 import org.apache.tapestry.annotations.Environmental;
-import org.apache.tapestry.annotations.Inject;
 import org.apache.tapestry.annotations.Parameter;
 import org.apache.tapestry.corelib.base.AbstractField;
+import org.apache.tapestry.ioc.annotations.Inject;
 import org.apache.tapestry.services.FieldValidatorDefaultSource;
 import org.apache.tapestry.services.FormSupport;
 import org.apache.tapestry.upload.services.MultipartDecoder;

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/MultipartServletRequestFilter.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/MultipartServletRequestFilter.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/MultipartServletRequestFilter.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/MultipartServletRequestFilter.java
Tue Oct  9 08:22:27 2007
@@ -14,13 +14,14 @@
 
 package org.apache.tapestry.upload.services;
 
-import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.apache.tapestry.services.HttpServletRequestFilter;
-import org.apache.tapestry.services.HttpServletRequestHandler;
+import java.io.IOException;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
+
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.tapestry.services.HttpServletRequestFilter;
+import org.apache.tapestry.services.HttpServletRequestHandler;
 
 /**
  * Filter that decodes an incoming multipart request.

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/UploadMessages.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/UploadMessages.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/UploadMessages.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/UploadMessages.java
Tue Oct  9 08:22:27 2007
@@ -14,10 +14,10 @@
 
 package org.apache.tapestry.upload.services;
 
+import java.io.File;
+
 import org.apache.tapestry.ioc.Messages;
 import org.apache.tapestry.ioc.internal.util.MessagesImpl;
-
-import java.io.File;
 
 class UploadMessages
 {

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/UploadedFileItem.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/UploadedFileItem.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/UploadedFileItem.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/main/java/org/apache/tapestry/upload/services/UploadedFileItem.java
Tue Oct  9 08:22:27 2007
@@ -14,12 +14,12 @@
 
 package org.apache.tapestry.upload.services;
 
-import org.apache.commons.fileupload.FileItem;
-import org.apache.commons.io.FilenameUtils;
-
 import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.io.FilenameUtils;
 
 /**
  * Implentation of {@link UploadedFile} for FileItems.

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/integration/UploadIntegrationTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/integration/UploadIntegrationTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/integration/UploadIntegrationTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/integration/UploadIntegrationTest.java
Tue Oct  9 08:22:27 2007
@@ -14,13 +14,13 @@
 
 package org.apache.tapestry.upload.integration;
 
+import java.io.File;
+import java.io.IOException;
+
 import org.apache.tapestry.test.AbstractIntegrationTestSuite;
 import org.example.upload.pages.Start;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
-
-import java.io.File;
-import java.io.IOException;
 
 /**
  * . TODO: These tests wont work because Selenium cannot enter values for input type="file'

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/MultipartDecoderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/MultipartDecoderImplTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/MultipartDecoderImplTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/MultipartDecoderImplTest.java
Tue Oct  9 08:22:27 2007
@@ -14,17 +14,17 @@
 
 package org.apache.tapestry.upload.services;
 
-import org.apache.commons.fileupload.FileItem;
-import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.apache.tapestry.test.TapestryTestCase;
-import org.apache.tapestry.upload.services.MultipartDecoderImpl;
-import org.testng.annotations.Test;
-
-import javax.servlet.http.HttpServletRequest;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
 import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.tapestry.test.TapestryTestCase;
+import org.testng.annotations.Test;
 
 public class MultipartDecoderImplTest extends TapestryTestCase
 {

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/MultipartServletRequestFilterTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/MultipartServletRequestFilterTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/MultipartServletRequestFilterTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/MultipartServletRequestFilterTest.java
Tue Oct  9 08:22:27 2007
@@ -14,14 +14,12 @@
 
 package org.apache.tapestry.upload.services;
 
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.tapestry.services.HttpServletRequestHandler;
 import org.apache.tapestry.test.TapestryTestCase;
-import org.apache.tapestry.upload.services.MultipartDecoder;
-import org.apache.tapestry.upload.services.MultipartServletRequestFilter;
 import org.testng.annotations.Test;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
 
 public class MultipartServletRequestFilterTest extends TapestryTestCase
 {

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/ParametersServletRequestWrapperTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/ParametersServletRequestWrapperTest.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/ParametersServletRequestWrapperTest.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/apache/tapestry/upload/services/ParametersServletRequestWrapperTest.java
Tue Oct  9 08:22:27 2007
@@ -14,17 +14,23 @@
 
 package org.apache.tapestry.upload.services;
 
-import static org.easymock.EasyMock.*;
-import static org.testng.Assert.*;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertFalse;
+import static org.testng.Assert.assertNotNull;
+import static org.testng.Assert.assertNull;
+import static org.testng.Assert.assertTrue;
 
-import org.apache.tapestry.upload.services.ParametersServletRequestWrapper;
-import org.testng.annotations.Test;
-
-import javax.servlet.http.HttpServletRequest;
 import java.util.Enumeration;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.testng.annotations.Test;
 
 public class ParametersServletRequestWrapperTest
 {

Modified: tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/pages/Start.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/pages/Start.java?rev=583192&r1=583191&r2=583192&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/pages/Start.java
(original)
+++ tapestry/tapestry5/trunk/tapestry-upload/src/test/java/org/example/upload/pages/Start.java
Tue Oct  9 08:22:27 2007
@@ -14,10 +14,10 @@
 
 package org.example.upload.pages;
 
+import java.io.File;
+
 import org.apache.tapestry.annotations.Persist;
 import org.apache.tapestry.upload.services.UploadedFile;
-
-import java.io.File;
 
 public class Start
 {



Mime
View raw message