Modified: tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/components/RenderableProvider.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/components/RenderableProvider.java?view=diff&rev=516646&r1=516645&r2=516646 ============================================================================== --- tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/components/RenderableProvider.java (original) +++ tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/components/RenderableProvider.java Fri Mar 9 19:04:02 2007 @@ -23,7 +23,7 @@ public class RenderableProvider { - @Inject("service:tapestry.Environment") + @Inject("service:Environment") private Environment _environment; @SetupRender
Modified: tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/pages/Localization.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/pages/Localization.java?view=diff&rev=516646&r1=516645&r2=516646 ============================================================================== --- tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/pages/Localization.java (original) +++ tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/pages/Localization.java Fri Mar 9 19:04:02 2007 @@ -28,10 +28,10 @@ @Inject private Messages _messages; - @Inject("service:tapestry.ioc.ClassFactory") + @Inject("service:ClassFactory") private ClassFactory _iocClassFactory; - @Inject("service:tapestry.ComponentClassFactory") + @Inject("service:ComponentClassFactory") private ClassFactory _componentClassFactory; @Inject Modified: tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/services/AppModule.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/services/AppModule.java?view=diff&rev=516646&r1=516645&r2=516646 ============================================================================== --- tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/services/AppModule.java (original) +++ tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app1/services/AppModule.java Fri Mar 9 19:04:02 2007 @@ -1,4 +1,4 @@ -// Copyright 2006 The Apache Software Foundation +// Copyright 2006, 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. @@ -22,8 +22,6 @@ import org.apache.tapestry.integration.app1.data.Track; import org.apache.tapestry.ioc.MappedConfiguration; import org.apache.tapestry.ioc.OrderedConfiguration; -import org.apache.tapestry.ioc.annotations.Contribute; -import org.apache.tapestry.ioc.annotations.Id; import org.apache.tapestry.ioc.annotations.InjectService; import org.apache.tapestry.services.Request; import org.apache.tapestry.services.RequestFilter; @@ -33,7 +31,6 @@ /** * I was just dying to see how fast requests are! */ [EMAIL PROTECTED]("app") public class AppModule { public RequestFilter buildTimingFilter(final Log log) @@ -59,16 +56,15 @@ }; } - @Contribute("tapestry.RequestHandler") - public void contributeRequestFilters(OrderedConfiguration<RequestFilter> configuration, + public void contributeRequestHandler(OrderedConfiguration<RequestFilter> configuration, @InjectService("TimingFilter") RequestFilter filter) { configuration.add("Timing", filter); } - @Contribute("tapestry.ClasspathAssetAliasManager") - public void contributeAliases(MappedConfiguration<String, String> configuration) + public void contributeClasspathAssetAliasManager( + MappedConfiguration<String, String> configuration) { configuration.add("app1/", "org/apache/tapestry/integration/app1/"); } @@ -84,7 +80,6 @@ }; } - @Contribute("tapestry.ioc.ApplicationDefaults") public static void contributeApplicationDefaults( MappedConfiguration<String, String> configuration) { Modified: tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app2/services/LocaleAppModule.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app2/services/LocaleAppModule.java?view=diff&rev=516646&r1=516645&r2=516646 ============================================================================== --- tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app2/services/LocaleAppModule.java (original) +++ tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/integration/app2/services/LocaleAppModule.java Fri Mar 9 19:04:02 2007 @@ -1,4 +1,4 @@ -// Copyright 2006 The Apache Software Foundation +// Copyright 2006, 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. @@ -15,15 +15,13 @@ package org.apache.tapestry.integration.app2.services; import org.apache.tapestry.ioc.MappedConfiguration; -import org.apache.tapestry.ioc.annotations.Contribute; public class LocaleAppModule { - @Contribute("tapestry.ioc.ApplicationDefaults") - public static void contributeApplicationDefaults( - MappedConfiguration<String, String> configuration) - { - configuration.add("tapestry.supported-locales", "en,fr,de"); - } + public static void contributeApplicationDefaults( + MappedConfiguration<String, String> configuration) + { + configuration.add("tapestry.supported-locales", "en,fr,de"); + } } Modified: tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/TapestryAppInitializerTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/TapestryAppInitializerTest.java?view=diff&rev=516646&r1=516645&r2=516646 ============================================================================== --- tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/TapestryAppInitializerTest.java (original) +++ tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/TapestryAppInitializerTest.java Fri Mar 9 19:04:02 2007 @@ -1,4 +1,4 @@ -// Copyright 2006 The Apache Software Foundation +// Copyright 2006, 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. @@ -12,41 +12,33 @@ // See the License for the specific language governing permissions and // limitations under the License. -package org.apache.tapestry.internal; - -import org.apache.tapestry.ioc.Registry; -import org.apache.tapestry.util.Transformer; -import org.testng.Assert; -import org.testng.annotations.AfterMethod; -import org.testng.annotations.Test; - [EMAIL PROTECTED] -public class TapestryAppInitializerTest extends Assert -{ - private Registry registry; - - @Test - public void testLoadAppModule() - { - registry = new TapestryAppInitializer("org.apache.tapestry.integration.app0", "foo", "") - .getRegistry(); - @SuppressWarnings("unchecked") - Transformer<String> s1 = registry.getService("m1.Service1", Transformer.class); - assertEquals(s1.transform("a"), "A"); - } - - @Test - public void testNoAppModule() - { - registry = new TapestryAppInitializer("non_existing.package", "foo", "").getRegistry(); - } - - @AfterMethod - public void after() - { - if (registry != null) - { - registry.shutdown(); - } - } -} +package org.apache.tapestry.internal; + +import org.apache.tapestry.ioc.Registry; +import org.apache.tapestry.util.Transformer; +import org.testng.Assert; +import org.testng.annotations.Test; + [EMAIL PROTECTED] +public class TapestryAppInitializerTest extends Assert +{ + @SuppressWarnings("unchecked") + @Test + public void testLoadAppModule() + { + Registry registry = new TapestryAppInitializer("org.apache.tapestry.integration.app0", + "foo", "").getRegistry(); + + Transformer<String> s1 = registry.getService("Service1", Transformer.class); + assertEquals(s1.transform("a"), "A"); + } + + @Test + public void testNoAppModule() + { + // Apparently just checking to see that it doesn't fail. + + new TapestryAppInitializer("non_existing.package", "foo", "").getRegistry(); + } + +} Modified: tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/TapestryInternalUtilsTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/TapestryInternalUtilsTest.java?view=diff&rev=516646&r1=516645&r2=516646 ============================================================================== --- tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/TapestryInternalUtilsTest.java (original) +++ tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/TapestryInternalUtilsTest.java Fri Mar 9 19:04:02 2007 @@ -47,8 +47,8 @@ @BeforeClass public void setup() { - _classFactory = getObject("service:tapestry.ioc.ClassFactory", ClassFactory.class); - _access = getObject("service:tapestry.ioc.PropertyAccess", PropertyAccess.class); + _classFactory = getService("ClassFactory", ClassFactory.class); + _access = getService("PropertyAccess", PropertyAccess.class); } @AfterClass @@ -91,24 +91,6 @@ TapestryInternalUtils.close(c); verify(); - } - - @Test(dataProvider = "decapitalize_inputs") - public void decapitalize(String input, String expected) - { - assertEquals(TapestryInternalUtils.decapitalize(input), expected); - } - - @DataProvider(name = "decapitalize_inputs") - public Object[][] decaptialize_inputs() - { - return new Object[][] - { - { "Alpha", "alpha" }, - { "beta", "beta" }, - { "A", "a" }, - { "z", "z" }, - { "0abc", "0abc" } }; } @Test(dataProvider = "to_user_presentable") Modified: tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java?view=diff&rev=516646&r1=516645&r2=516646 ============================================================================== --- tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java (original) +++ tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/bindings/PropBindingFactoryTest.java Fri Mar 9 19:04:02 2007 @@ -36,7 +36,7 @@ @BeforeClass public void setup_factory() { - _factory = getService("tapestry.internal.PropBindingFactory", BindingFactory.class); + _factory = getService("PropBindingFactory", BindingFactory.class); } @AfterClass Modified: tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/ComponentInstantiatorSourceImplTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/ComponentInstantiatorSourceImplTest.java?view=diff&rev=516646&r1=516645&r2=516646 ============================================================================== --- tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/ComponentInstantiatorSourceImplTest.java (original) +++ tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/ComponentInstantiatorSourceImplTest.java Fri Mar 9 19:04:02 2007 @@ -1,4 +1,4 @@ -// Copyright 2006 The Apache Software Foundation +// Copyright 2006, 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. @@ -177,8 +177,7 @@ while (true) { - if (readDTM(url) != dtm) - break; + if (readDTM(url) != dtm) break; // Keep re-writing the file until we see the DTM change. @@ -187,9 +186,7 @@ // Detect the change and clear out the internal caches - UpdateListenerHub hub = _registry.getService( - "tapestry.internal.UpdateListenerHub", - UpdateListenerHub.class); + UpdateListenerHub hub = _registry.getService("UpdateListenerHub", UpdateListenerHub.class); hub.fireUpdateEvent(); @@ -281,7 +278,7 @@ _registry = builder.build(); - _registry.getService("tapestry.Infrastructure", Infrastructure.class).setMode("servlet"); + _registry.getService("Infrastructure", Infrastructure.class).setMode("servlet"); _source = _registry.getService(ComponentInstantiatorSource.class); _access = _registry.getService(PropertyAccess.class); Modified: tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/InternalClassTransformationImplTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/InternalClassTransformationImplTest.java?view=diff&rev=516646&r1=516645&r2=516646 ============================================================================== --- tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/InternalClassTransformationImplTest.java (original) +++ tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/InternalClassTransformationImplTest.java Fri Mar 9 19:04:02 2007 @@ -81,7 +81,7 @@ @BeforeClass public void setup_access() { - _access = getService("tapestry.ioc.PropertyAccess", PropertyAccess.class); + _access = getService("PropertyAccess", PropertyAccess.class); } @AfterClass Modified: tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/LinkFactoryImplTest.java URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/LinkFactoryImplTest.java?view=diff&rev=516646&r1=516645&r2=516646 ============================================================================== --- tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/LinkFactoryImplTest.java (original) +++ tapestry/tapestry5/tapestry-core/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/internal/services/LinkFactoryImplTest.java Fri Mar 9 19:04:02 2007 @@ -49,7 +49,7 @@ @BeforeClass public void setup() { - _typeCoercer = getObject("service:tapestry.ioc.TypeCoercer", TypeCoercer.class); + _typeCoercer = getObject("service:TypeCoercer", TypeCoercer.class); } @AfterClass @@ -98,7 +98,7 @@ "fred", 5); } - + @Test public void page_level_event_always_includes_action() {
