You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2007/03/09 20:49:55 UTC

svn commit: r516524 [3/3] - in /tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src: main/java/org/apache/tapestry/ioc/ main/java/org/apache/tapestry/ioc/annotations/ main/java/org/apache/tapestry/ioc/def/ main/java/org/apache/tape...

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTest.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTest.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTest.java Fri Mar  9 11:49:51 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.
@@ -45,10 +45,10 @@
 
         Module module = new ModuleImpl(registry, moduleDef, log);
 
-        train_getLog(registry, "ioc.test.Upcase", log);
+        train_getLog(registry, "Upcase", log);
 
         train_isDebugEnabled(log, true);
-        log.debug("Creating service 'ioc.test.Upcase'.");
+        log.debug("Creating service 'Upcase'.");
 
         train_getLifecycle(registry, "singleton", new SingletonServiceLifecycle());
 
@@ -62,7 +62,7 @@
 
         replay();
 
-        UpcaseService service = module.getService("ioc.test.Upcase", UpcaseService.class, module);
+        UpcaseService service = module.getService("Upcase", UpcaseService.class, module);
 
         assertEquals(service.upcase("hello"), "HELLO");
 
@@ -86,7 +86,7 @@
 
         Module module = new ModuleImpl(registry, moduleDef, log);
 
-        train_getLog(registry, "ioc.test.PrivateUpcase", log);
+        train_getLog(registry, "PrivateUpcase", log);
 
         train_isDebugEnabled(log, false);
 
@@ -102,10 +102,7 @@
 
         replay();
 
-        UpcaseService service = module.getService(
-                "ioc.test.PrivateUpcase",
-                UpcaseService.class,
-                module);
+        UpcaseService service = module.getService("PrivateUpcase", UpcaseService.class, module);
 
         assertEquals(service.upcase("hello"), "HELLO");
 
@@ -126,14 +123,14 @@
 
         try
         {
-            module.getService("ioc.test.PrivateUpcase", UpcaseService.class, null);
+            module.getService("PrivateUpcase", UpcaseService.class, null);
             unreachable();
         }
         catch (RuntimeException ex)
         {
             assertEquals(
                     ex.getMessage(),
-                    "Service 'ioc.test.PrivateUpcase' is private, and may not be referenced outside of its containing module.");
+                    "Service 'PrivateUpcase' is private, and may not be referenced outside of its containing module.");
         }
 
         verify();
@@ -154,12 +151,12 @@
         Collection<String> ids = module.findServiceIdsForInterface(UpcaseService.class, module);
 
         assertEquals(ids.size(), 2);
-        assertTrue(ids.contains("ioc.test.Upcase"));
-        assertTrue(ids.contains("ioc.test.PrivateUpcase"));
+        assertTrue(ids.contains("Upcase"));
+        assertTrue(ids.contains("PrivateUpcase"));
 
         ids = module.findServiceIdsForInterface(UpcaseService.class, null);
         assertEquals(ids.size(), 1);
-        assertTrue(ids.contains("ioc.test.Upcase"));
+        assertTrue(ids.contains("Upcase"));
 
         verify();
     }
@@ -197,24 +194,6 @@
     }
 
     @Test
-    public void get_module_id()
-    {
-        InternalRegistry registry = newInternalRegistry();
-        Log log = newLog();
-        ModuleDef def = newModuleDef();
-
-        train_getModuleId(def, "foo.bar");
-
-        replay();
-
-        Module module = new ModuleImpl(registry, def, log);
-
-        assertEquals(module.getModuleId(), "foo.bar");
-
-        verify();
-    }
-
-    @Test
     public void no_public_constructor_on_module_builder_class()
     {
         InternalRegistry registry = newInternalRegistry();
@@ -234,7 +213,7 @@
         {
             assertEquals(
                     ex.getMessage(),
-                    "Module builder for module 'private' (class org.apache.tapestry.ioc.internal.PrivateConstructorModule) "
+                    "Module builder class org.apache.tapestry.ioc.internal.PrivateConstructorModule "
                             + "does not contain any public constructors.");
         }
 
@@ -253,9 +232,9 @@
 
         log.warn(contains("contains more than one public constructor"));
 
-        train_expandSymbols(registry, "tapestry.ioc.ClassFactory", "tapestry.ioc.ClassFactory");
+        train_expandSymbols(registry, "ClassFactory", "ClassFactory");
 
-        train_getService(registry, "tapestry.ioc.ClassFactory", ClassFactory.class, module, factory);
+        train_getService(registry, "ClassFactory", ClassFactory.class, module, factory);
 
         replay();
 
@@ -289,11 +268,11 @@
         assertEquals(us.upcase("hello"), "HELLO");
         assertEquals(
                 us.toString(),
-                "<Proxy for ioc.test.Upcase(org.apache.tapestry.ioc.internal.UpcaseService)>");
+                "<Proxy for Upcase(org.apache.tapestry.ioc.internal.UpcaseService)>");
 
         ToStringService ts = registry.getService(ToStringService.class);
 
-        assertEquals(ts.toString(), "<ToStringService: ioc.test.ToString>");
+        assertEquals(ts.toString(), "<ToStringService: ToString>");
     }
 
     @Test
@@ -301,7 +280,7 @@
     {
         Registry registry = buildRegistry();
 
-        FoeService foe = registry.getService("ioc.test.RecursiveFoe", FoeService.class);
+        FoeService foe = registry.getService("RecursiveFoe", FoeService.class);
 
         try
         {

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTestModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTestModule.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTestModule.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ModuleImplTestModule.java Fri Mar  9 11:49:51 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,56 +12,52 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry.ioc.internal;
-
-import org.apache.tapestry.ioc.annotations.Id;
-import org.apache.tapestry.ioc.annotations.InjectService;
-import org.apache.tapestry.ioc.annotations.Private;
-
-/**
- * Module builder used by {@link ModuleImplTest}.
- * 
- * 
- */
-@Id("ioc.test")
-public class ModuleImplTestModule
-{
-    public UpcaseService buildUpcase()
-    {
-        return new UpcaseServiceImpl();
-    }
-
-    @Private
-    public UpcaseService buildPrivateUpcase()
-    {
-        return new UpcaseServiceImpl();
-    }
-
-    public ToStringService buildToString(final String serviceId)
-    {
-        return new ToStringService()
-        {
-            @Override
-            public String toString()
-            {
-                return "<ToStringService: " + serviceId + ">";
-            }
-        };
-    }
-
-    public FieService buildFie()
-    {
-        return null;
-    }
-
-    public FoeService buildRecursiveFoe(@InjectService("ioc.test.RecursiveFoe")
-    FoeService self)
-    {
-        // While constructing self, we invoke a method on self.
-
-        self.foe();
-
-        return null;
-    }
-
-}
+package org.apache.tapestry.ioc.internal;
+
+import org.apache.tapestry.ioc.annotations.InjectService;
+import org.apache.tapestry.ioc.annotations.Private;
+
+/**
+ * Module builder used by {@link ModuleImplTest}.
+ */
+public class ModuleImplTestModule
+{
+    public UpcaseService buildUpcase()
+    {
+        return new UpcaseServiceImpl();
+    }
+
+    @Private
+    public UpcaseService buildPrivateUpcase()
+    {
+        return new UpcaseServiceImpl();
+    }
+
+    public ToStringService buildToString(final String serviceId)
+    {
+        return new ToStringService()
+        {
+            @Override
+            public String toString()
+            {
+                return "<ToStringService: " + serviceId + ">";
+            }
+        };
+    }
+
+    public FieService buildFie()
+    {
+        return null;
+    }
+
+    public FoeService buildRecursiveFoe(@InjectService("RecursiveFoe")
+    FoeService self)
+    {
+        // While constructing self, we invoke a method on self.
+
+        self.foe();
+
+        return null;
+    }
+
+}

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/NoUsableContributionParameterModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/NoUsableContributionParameterModule.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/NoUsableContributionParameterModule.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/NoUsableContributionParameterModule.java Fri Mar  9 11:49:51 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,22 +12,18 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry.ioc.internal;
-
-import org.apache.tapestry.ioc.annotations.Id;
-import org.apache.tapestry.ioc.annotations.InjectService;
-
-/**
- * Used by {@link org.apache.tapestry.ioc.internal.DefaultModuleDefImpl}.
- * 
- * 
- */
-@Id("ioc.test")
-public class NoUsableContributionParameterModule
-{
-    public void contributeNoParameter(@InjectService("foo.Bar")
-    UpcaseService service)
-    {
-
-    }
-}
+package org.apache.tapestry.ioc.internal;
+
+import org.apache.tapestry.ioc.annotations.InjectService;
+
+/**
+ * Used by {@link org.apache.tapestry.ioc.internal.DefaultModuleDefImpl}.
+ */
+public class NoUsableContributionParameterModule
+{
+    public void contributeNoParameter(@InjectService("foo.Bar")
+    UpcaseService service)
+    {
+
+    }
+}

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/OrderedConfigurationModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/OrderedConfigurationModule.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/OrderedConfigurationModule.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/OrderedConfigurationModule.java Fri Mar  9 11:49:51 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,21 +12,17 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry.ioc.internal;
-
-import org.apache.tapestry.ioc.OrderedConfiguration;
-import org.apache.tapestry.ioc.annotations.Id;
-
-/**
- * Used by {@link org.apache.tapestry.ioc.internal.DefaultModuleDefImpl}.
- * 
- * 
- */
-@Id("ioc.test")
-public class OrderedConfigurationModule
-{
-    public void contributeOrdered(OrderedConfiguration configuration)
-    {
-
-    }
-}
+package org.apache.tapestry.ioc.internal;
+
+import org.apache.tapestry.ioc.OrderedConfiguration;
+
+/**
+ * Used by {@link org.apache.tapestry.ioc.internal.DefaultModuleDefImpl}.
+ */
+public class OrderedConfigurationModule
+{
+    public void contributeOrdered(OrderedConfiguration configuration)
+    {
+
+    }
+}

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/PrivateConstructorModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/PrivateConstructorModule.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/PrivateConstructorModule.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/PrivateConstructorModule.java Fri Mar  9 11:49:51 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,19 +12,15 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry.ioc.internal;
-
-import org.apache.tapestry.ioc.annotations.Id;
-
-/**
- * Used by {@link org.apache.tapestry.ioc.internal.ModuleImplTest}.
- * 
- * 
- */
-@Id("private")
-public class PrivateConstructorModule
-{
-    private PrivateConstructorModule()
-    {
-    }
-}
+package org.apache.tapestry.ioc.internal;
+
+
+/**
+ * Used by {@link org.apache.tapestry.ioc.internal.ModuleImplTest}.
+ */
+public class PrivateConstructorModule
+{
+    private PrivateConstructorModule()
+    {
+    }
+}

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceIdConflictMethodModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceIdConflictMethodModule.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceIdConflictMethodModule.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ServiceIdConflictMethodModule.java Fri Mar  9 11:49:51 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,26 +12,21 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry.ioc.internal;
-
-import org.apache.tapestry.ioc.annotations.Id;
-
-/**
- * Used by {@link org.apache.tapestry.ioc.internal.DefaultModuleDefImplTest}.
- * 
- * 
- */
-@Id("ioc")
-public class ServiceIdConflictMethodModule
-{
-    public FieService buildFred()
-    {
-        return null;
-    }
-
-    public FieService buildFred(Object param)
-    {
-        return null;
-    }
-
-}
+package org.apache.tapestry.ioc.internal;
+
+/**
+ * Used by {@link org.apache.tapestry.ioc.internal.DefaultModuleDefImplTest}.
+ */
+public class ServiceIdConflictMethodModule
+{
+    public FieService buildFred()
+    {
+        return null;
+    }
+
+    public FieService buildFred(Object param)
+    {
+        return null;
+    }
+
+}

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/SimpleModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/SimpleModule.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/SimpleModule.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/SimpleModule.java Fri Mar  9 11:49:51 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,56 +12,52 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry.ioc.internal;
-
-import org.apache.tapestry.ioc.Configuration;
-import org.apache.tapestry.ioc.annotations.EagerLoad;
-import org.apache.tapestry.ioc.annotations.Id;
-import org.apache.tapestry.ioc.annotations.Lifecycle;
-import org.apache.tapestry.ioc.annotations.Private;
-
-/**
- * Used by {@link org.apache.tapestry.ioc.internal.DefaultModuleDefImplTest}.
- * 
- * 
- */
-@Id("ioc")
-public class SimpleModule
-{
-    public FieService buildFred()
-    {
-        return null;
-    }
-
-    @Lifecycle("threaded")
-    @Private
-    public FoeService buildBarney()
-    {
-        return null;
-    }
-
-    @EagerLoad
-    public FoeService buildWilma()
-    {
-        return null;
-    }
-
-    public void ignoredMethod()
-    {
-    }
-
-    /**
-     * Minimal decorator method that uses generics to qualify the delegate passed in and the object
-     * returned.
-     */
-    public <T> T decorateLogging(Class<T> serviceInterace, T delegate)
-    {
-        return null;
-    }
-
-    /** Minimal contribution method. */
-    public void contributeBarney(Configuration configuration)
-    {
-
-    }
-}
+package org.apache.tapestry.ioc.internal;
+
+import org.apache.tapestry.ioc.Configuration;
+import org.apache.tapestry.ioc.annotations.EagerLoad;
+import org.apache.tapestry.ioc.annotations.Lifecycle;
+import org.apache.tapestry.ioc.annotations.Private;
+
+/**
+ * Used by {@link org.apache.tapestry.ioc.internal.DefaultModuleDefImplTest}.
+ */
+public class SimpleModule
+{
+    public FieService buildFred()
+    {
+        return null;
+    }
+
+    @Lifecycle("threaded")
+    @Private
+    public FoeService buildBarney()
+    {
+        return null;
+    }
+
+    @EagerLoad
+    public FoeService buildWilma()
+    {
+        return null;
+    }
+
+    public void ignoredMethod()
+    {
+    }
+
+    /**
+     * Minimal decorator method that uses generics to qualify the delegate passed in and the object
+     * returned.
+     */
+    public <T> T decorateLogging(Class<T> serviceInterace, T delegate)
+    {
+        return null;
+    }
+
+    /** Minimal contribution method. */
+    public void contributeBarney(Configuration configuration)
+    {
+
+    }
+}

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/TooManyContributionParametersModule.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/TooManyContributionParametersModule.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/TooManyContributionParametersModule.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/TooManyContributionParametersModule.java Fri Mar  9 11:49:51 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,24 +12,19 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry.ioc.internal;
-
-import org.apache.tapestry.ioc.Configuration;
-import org.apache.tapestry.ioc.OrderedConfiguration;
-import org.apache.tapestry.ioc.annotations.Id;
-
-/**
- * Used by {@link org.apache.tapestry.ioc.internal.DefaultModuleDefImpl}.
- * 
- * 
- */
-@Id("ioc.test")
-public class TooManyContributionParametersModule
-{
-
-    public void contributeTooMany(Configuration configuration1, OrderedConfiguration configuration2)
-    {
-
-    }
-
-}
+package org.apache.tapestry.ioc.internal;
+
+import org.apache.tapestry.ioc.Configuration;
+import org.apache.tapestry.ioc.OrderedConfiguration;
+
+/**
+ * Used by {@link org.apache.tapestry.ioc.internal.DefaultModuleDefImpl}.
+ */
+public class TooManyContributionParametersModule
+{
+
+    public void contributeTooMany(Configuration configuration1, OrderedConfiguration configuration2)
+    {
+
+    }
+}

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingOrderedConfigurationWrapperTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingOrderedConfigurationWrapperTest.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingOrderedConfigurationWrapperTest.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/ValidatingOrderedConfigurationWrapperTest.java Fri Mar  9 11:49:51 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.
@@ -31,14 +31,14 @@
         OrderedConfiguration<Runnable> configuration = newOrderedConfiguration();
         Runnable contribution = newRunnable();
 
-        configuration.add("fred.id", contribution, "after:fred.pre", "before:fred.post");
+        configuration.add("id", contribution, "after:pre", "before:post");
 
         replay();
 
         OrderedConfiguration<Runnable> wrapper = new ValidatingOrderedConfigurationWrapper<Runnable>(
-                "barney.Service", "fred", def, log, Runnable.class, configuration);
+                "Service", def, log, Runnable.class, configuration);
 
-        wrapper.add("id", contribution, "after:fred.pre", "before:fred.post");
+        wrapper.add("id", contribution, "after:pre", "before:post");
 
         verify();
     }
@@ -51,12 +51,12 @@
         OrderedConfiguration<Runnable> configuration = newOrderedConfiguration();
         Runnable contribution = newRunnable();
 
-        configuration.add("fred.id", contribution);
+        configuration.add("id", contribution);
 
         replay();
 
         OrderedConfiguration<Runnable> wrapper = new ValidatingOrderedConfigurationWrapper<Runnable>(
-                "barney.Service", "fred", def, log, Runnable.class, configuration);
+                "Service", def, log, Runnable.class, configuration);
 
         wrapper.add("id", contribution);
 
@@ -70,12 +70,12 @@
         Log log = newLog();
         OrderedConfiguration<Runnable> configuration = newOrderedConfiguration();
 
-        configuration.add("fred.id", null);
+        configuration.add("id", null);
 
         replay();
 
         OrderedConfiguration<Runnable> wrapper = new ValidatingOrderedConfigurationWrapper<Runnable>(
-                "barney.Service", "fred", def, log, Runnable.class, configuration);
+                "Service", def, log, Runnable.class, configuration);
 
         wrapper.add("id", null);
 
@@ -88,22 +88,22 @@
     {
         Method method = findMethod("contributeBarneyService");
 
-        ContributionDef def = new ContributionDefImpl("barney.Service", method);
+        ContributionDef def = new ContributionDefImpl("Service", method);
         Log log = newLog();
         OrderedConfiguration<Runnable> configuration = newOrderedConfiguration();
 
         log.warn(IOCMessages.contributionWrongValueType(
-                "barney.Service",
+                "Service",
                 def,
                 String.class,
                 Runnable.class));
 
-        configuration.add("fred.id", null);
+        configuration.add("id", null);
 
         replay();
 
-        OrderedConfiguration wrapper = new ValidatingOrderedConfigurationWrapper("barney.Service",
-                "fred", def, log, Runnable.class, configuration);
+        OrderedConfiguration wrapper = new ValidatingOrderedConfigurationWrapper("Service", def,
+                log, Runnable.class, configuration);
 
         wrapper.add("id", "string");
 

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/DefaultImplementationBuilderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/DefaultImplementationBuilderImplTest.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/DefaultImplementationBuilderImplTest.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/DefaultImplementationBuilderImplTest.java Fri Mar  9 11:49:51 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.
@@ -27,9 +27,7 @@
     @BeforeClass
     public void setup_builder()
     {
-        _builder = getService(
-                "tapestry.ioc.DefaultImplementationBuilder",
-                DefaultImplementationBuilder.class);
+        _builder = getService("DefaultImplementationBuilder", DefaultImplementationBuilder.class);
     }
 
     @AfterClass

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionAnalyzerImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionAnalyzerImplTest.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionAnalyzerImplTest.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/ExceptionAnalyzerImplTest.java Fri Mar  9 11:49:51 2007
@@ -33,7 +33,7 @@
     @BeforeClass
     public void setup_analyzer()
     {
-        _analyzer = getService("tapestry.ioc.ExceptionAnalyzer", ExceptionAnalyzer.class);
+        _analyzer = getService("ExceptionAnalyzer", ExceptionAnalyzer.class);
     }
 
     @AfterClass

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/PipelineBuilderImplTest.java Fri Mar  9 11:49:51 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.
@@ -41,7 +41,7 @@
     public void setup_builder()
     {
         _registry = buildRegistry();
-        _builder = _registry.getService("tapestry.ioc.PipelineBuilder", PipelineBuilder.class);
+        _builder = _registry.getService("PipelineBuilder", PipelineBuilder.class);
     }
 
     @AfterClass

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/PropertyAccessImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/PropertyAccessImplTest.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/PropertyAccessImplTest.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/services/PropertyAccessImplTest.java Fri Mar  9 11:49:51 2007
@@ -173,9 +173,9 @@
 
         b.setValue(value);
 
-        assertEquals(_access.get(b, "VALUE"), value);     
+        assertEquals(_access.get(b, "VALUE"), value);
     }
-    
+
     @Test
     public void simple_write_access()
     {
@@ -187,7 +187,7 @@
 
         assertEquals(b.getValue(), value);
     }
-    
+
     @Test
     public void property_name_case_is_ignored_on_write()
     {
@@ -197,7 +197,7 @@
 
         _access.set(b, "VALUE", value);
 
-        assertEquals(b.getValue(), value); 
+        assertEquals(b.getValue(), value);
     }
 
     @Test
@@ -395,8 +395,7 @@
     {
         Registry registry = buildRegistry();
 
-        PropertyAccess pa = registry
-                .getService("tapestry.ioc.PropertyAccess", PropertyAccess.class);
+        PropertyAccess pa = registry.getService("PropertyAccess", PropertyAccess.class);
 
         Bean b = new Bean();
 

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/util/OrdererTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/util/OrdererTest.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/util/OrdererTest.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/internal/util/OrdererTest.java Fri Mar  9 11:49:51 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.
@@ -50,16 +50,16 @@
     {
         Log log = newLog();
 
-        log.warn(UtilMessages.constraintFormat("fred", "foo.barney"));
+        log.warn(UtilMessages.constraintFormat("fred", "barney"));
 
         replay();
 
         Orderer<String> o = new Orderer<String>(log);
 
-        o.add("foo.fred", "FRED");
-        o.add("foo.barney", "BARNEY", "fred");
-        o.add("foo.wilma", "WILMA");
-        o.add("foo.betty", "BETTY");
+        o.add("fred", "FRED");
+        o.add("barney", "BARNEY", "fred");
+        o.add("wilma", "WILMA");
+        o.add("betty", "BETTY");
 
         List<String> ordered = o.getOrdered();
 
@@ -73,16 +73,16 @@
     {
         Log log = newLog();
 
-        log.warn(UtilMessages.constraintFormat("nearby:fred", "foo.barney"));
+        log.warn(UtilMessages.constraintFormat("nearby:fred", "barney"));
 
         replay();
 
         Orderer<String> o = new Orderer<String>(log);
 
-        o.add("foo.fred", "FRED");
-        o.add("foo.barney", "BARNEY", "nearby:fred");
-        o.add("foo.wilma", "WILMA");
-        o.add("foo.betty", "BETTY");
+        o.add("fred", "FRED");
+        o.add("barney", "BARNEY", "nearby:fred");
+        o.add("wilma", "WILMA");
+        o.add("betty", "BETTY");
 
         List<String> ordered = o.getOrdered();
 
@@ -123,23 +123,23 @@
 
         Orderer<String> o = new Orderer<String>(log);
 
-        o.add("foo.fred", "FRED");
-        o.add("foo.barney", "BARNEY");
-        o.add("foo.wilma", "WILMA");
+        o.add("fred", "FRED");
+        o.add("barney", "BARNEY");
+        o.add("wilma", "WILMA");
 
         verify();
 
-        log.warn(UtilMessages.duplicateOrderer("foo.fred"), null);
+        log.warn(UtilMessages.duplicateOrderer("fred"), null);
 
         replay();
 
-        o.add("foo.fred", "FRED2");
+        o.add("fred", "FRED2");
 
         verify();
 
         replay();
 
-        o.add("foo.betty", "BETTY");
+        o.add("betty", "BETTY");
 
         List<String> ordered = o.getOrdered();
 
@@ -157,10 +157,10 @@
 
         Orderer<String> o = new Orderer<String>(log);
 
-        o.add("foo.fred", "FRED");
-        o.add("foo.barney", "BARNEY", "before:*.*");
-        o.add("foo.wilma", "WILMA");
-        o.add("foo.betty", "BETTY");
+        o.add("fred", "FRED");
+        o.add("barney", "BARNEY", "before:*");
+        o.add("wilma", "WILMA");
+        o.add("betty", "BETTY");
 
         List<String> ordered = o.getOrdered();
 
@@ -178,10 +178,10 @@
 
         Orderer<String> o = new Orderer<String>(log);
 
-        o.add("foo.fred", "FRED");
-        o.add("foo.barney", "BARNEY", "after:*");
-        o.add("foo.wilma", "WILMA");
-        o.add("foo.betty", "BETTY");
+        o.add("fred", "FRED");
+        o.add("barney", "BARNEY", "after:*");
+        o.add("wilma", "WILMA");
+        o.add("betty", "BETTY");
 
         List<String> ordered = o.getOrdered();
 
@@ -199,10 +199,10 @@
 
         Orderer<String> o = new Orderer<String>(log);
 
-        o.add("foo.fred", "FRED", "after:wilma");
-        o.add("foo.barney", "BARNEY", "after:fred,betty");
-        o.add("foo.wilma", "WILMA");
-        o.add("foo.betty", "BETTY");
+        o.add("fred", "FRED", "after:wilma");
+        o.add("barney", "BARNEY", "after:fred,betty");
+        o.add("wilma", "WILMA");
+        o.add("betty", "BETTY");
 
         List<String> ordered = o.getOrdered();
 
@@ -220,10 +220,10 @@
 
         Orderer<String> o = new Orderer<String>(log);
 
-        o.add("foo.fred", "FRED", "after:wilma");
-        o.add("foo.barney", "BARNEY", "after:fred,betty");
-        o.add("foo.wilma", "WILMA");
-        o.add("foo.betty", "BETTY", "before:wilma");
+        o.add("fred", "FRED", "after:wilma");
+        o.add("barney", "BARNEY", "after:fred,betty");
+        o.add("wilma", "WILMA");
+        o.add("betty", "BETTY", "before:wilma");
 
         List<String> ordered = o.getOrdered();
 
@@ -241,10 +241,10 @@
 
         Orderer<String> o = new Orderer<String>(log);
 
-        o.add("foo.fred", "FRED", "after:Wilma");
-        o.add("foo.barney", "BARNEY", "after:Fred,BETTY");
-        o.add("foo.wilma", "WILMA");
-        o.add("foo.betty", "BETTY", "before:Foo.Wilma");
+        o.add("fred", "FRED", "after:Wilma");
+        o.add("barney", "BARNEY", "after:Fred,BETTY");
+        o.add("wilma", "WILMA");
+        o.add("betty", "BETTY", "before:Wilma");
 
         List<String> ordered = o.getOrdered();
 
@@ -253,44 +253,24 @@
         verify();
     }
 
-    @Test
-    public void cross_module()
-    {
-        Log log = newLog();
-
-        replay();
-
-        Orderer<String> o = new Orderer<String>(log);
-
-        o.add("foo.fred", "FRED", "after:*.wilma");
-        o.add("bar.barney", "BARNEY", "after:*.fred,*.betty");
-        o.add("baz.wilma", "WILMA");
-        o.add("biff.betty", "BETTY", "before:baz.*");
-
-        List<String> ordered = o.getOrdered();
-
-        assertEquals(ordered, Arrays.asList("BETTY", "WILMA", "FRED", "BARNEY"));
-
-        verify();
-    }
 
     @Test
     public void dependency_cycle()
     {
         Log log = newLog();
 
-        log.warn("Unable to add 'foo.barney' as a dependency of 'foo.betty', as that forms a "
-                + "dependency cycle ('foo.betty' depends on itself via 'foo.barney'). "
+        log.warn("Unable to add 'barney' as a dependency of 'betty', as that forms a "
+                + "dependency cycle ('betty' depends on itself via 'barney'). "
                 + "The dependency has been ignored.", null);
 
         replay();
 
         Orderer<String> o = new Orderer<String>(log);
 
-        o.add("foo.fred", "FRED", "after:wilma");
-        o.add("foo.barney", "BARNEY", "after:fred,betty");
-        o.add("foo.wilma", "WILMA");
-        o.add("foo.betty", "BETTY", "after:barney", "before:wilma");
+        o.add("fred", "FRED", "after:wilma");
+        o.add("barney", "BARNEY", "after:fred,betty");
+        o.add("wilma", "WILMA");
+        o.add("betty", "BETTY", "after:barney", "before:wilma");
 
         List<String> ordered = o.getOrdered();
 

Modified: tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java?view=diff&rev=516524&r1=516523&r2=516524
==============================================================================
--- tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java (original)
+++ tapestry/tapestry5/tapestry-ioc/branches/hlship-20070309-simplifyioc/src/test/java/org/apache/tapestry/ioc/services/PropertyShadowBuilderImplTest.java Fri Mar  9 11:49:51 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,148 +12,146 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package org.apache.tapestry.ioc.services;
-
+package org.apache.tapestry.ioc.services;
+
 import java.util.Map;
 
 import org.apache.tapestry.ioc.Registry;
 import org.apache.tapestry.ioc.internal.IOCInternalTestCase;
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
-
-public class PropertyShadowBuilderImplTest extends IOCInternalTestCase
-{
-    private PropertyShadowBuilder _builder;
-
-    private final String CLASS_NAME = getClass().getName();
-
-    @BeforeClass
-    public void setupBuilder()
-    {
-        Registry registry = buildRegistry();
-
-        _builder = registry.getService(
-                "tapestry.ioc.PropertyShadowBuilder",
-                PropertyShadowBuilder.class);
-    }
-
-    public class FooHolder
-    {
-        private Foo _foo;
-
-        private int _count = 0;
-
-        public Foo getFoo()
-        {
-            _count++;
-
-            return _foo;
-        }
-
-        public int getCount()
-        {
-            return _count;
-        }
-
-        public void setFoo(Foo foo)
-        {
-            _foo = foo;
-        }
-
-        @Override
-        public String toString()
-        {
-            return "[FooHolder]";
-        }
-
-        public void setWriteOnly(Foo foo)
-        {
-
-        }
-    }
-
-    public interface Foo
-    {
-        void foo();
-    }
-
-    @Test
-    public void basic_delegation()
-    {
-        Foo foo = newMock(Foo.class);
-        FooHolder holder = new FooHolder();
-
-        holder.setFoo(foo);
-
-        Foo shadow = _builder.build(holder, "foo", Foo.class);
-
-        for (int i = 0; i < 3; i++)
-        {
-            foo.foo();
-
-            replay();
-
-            shadow.foo();
-
-            verify();
-
-            assertEquals(holder.getCount(), i + 1);
-        }
-
-        assertEquals(shadow.toString(), "<Shadow: property foo of [FooHolder]>");
-    }
-
-    @Test
-    public void property_does_not_exist()
-    {
-        FooHolder holder = new FooHolder();
-
-        try
-        {
-            _builder.build(holder, "bar", Foo.class);
-            unreachable();
-        }
-        catch (RuntimeException ex)
-        {
-            assertEquals(ex.getMessage(), "Class " + CLASS_NAME
-                    + "$FooHolder does not contain a property named 'bar'.");
-        }
-    }
-
-    @Test
-    public void property_type_mismatch()
-    {
-        FooHolder holder = new FooHolder();
-
-        try
-        {
-            _builder.build(holder, "count", Map.class);
-            unreachable();
-        }
-        catch (RuntimeException ex)
-        {
-            assertEquals(ex.getMessage(), "Property 'count' of class " + CLASS_NAME
-                    + "$FooHolder is of type int, which is not assignable to type java.util.Map.");
-        }
-    }
-
-    @Test
-    public void property_write_only()
-    {
-        FooHolder holder = new FooHolder();
-
-        try
-        {
-            _builder.build(holder, "writeOnly", Foo.class);
-            unreachable();
-        }
-        catch (RuntimeException ex)
-        {
-            assertEquals(
-                    ex.getMessage(),
-                    "Class "
-                            + CLASS_NAME
-                            + "$FooHolder does not provide an accessor ('getter') method for property 'writeOnly'.");
-        }
-    }
-}
+
+public class PropertyShadowBuilderImplTest extends IOCInternalTestCase
+{
+    private PropertyShadowBuilder _builder;
+
+    private final String CLASS_NAME = getClass().getName();
+
+    @BeforeClass
+    public void setupBuilder()
+    {
+        Registry registry = buildRegistry();
+
+        _builder = registry.getService("PropertyShadowBuilder", PropertyShadowBuilder.class);
+    }
+
+    public class FooHolder
+    {
+        private Foo _foo;
+
+        private int _count = 0;
+
+        public Foo getFoo()
+        {
+            _count++;
+
+            return _foo;
+        }
+
+        public int getCount()
+        {
+            return _count;
+        }
+
+        public void setFoo(Foo foo)
+        {
+            _foo = foo;
+        }
+
+        @Override
+        public String toString()
+        {
+            return "[FooHolder]";
+        }
+
+        public void setWriteOnly(Foo foo)
+        {
+
+        }
+    }
+
+    public interface Foo
+    {
+        void foo();
+    }
+
+    @Test
+    public void basic_delegation()
+    {
+        Foo foo = newMock(Foo.class);
+        FooHolder holder = new FooHolder();
+
+        holder.setFoo(foo);
+
+        Foo shadow = _builder.build(holder, "foo", Foo.class);
+
+        for (int i = 0; i < 3; i++)
+        {
+            foo.foo();
+
+            replay();
+
+            shadow.foo();
+
+            verify();
+
+            assertEquals(holder.getCount(), i + 1);
+        }
+
+        assertEquals(shadow.toString(), "<Shadow: property foo of [FooHolder]>");
+    }
+
+    @Test
+    public void property_does_not_exist()
+    {
+        FooHolder holder = new FooHolder();
+
+        try
+        {
+            _builder.build(holder, "bar", Foo.class);
+            unreachable();
+        }
+        catch (RuntimeException ex)
+        {
+            assertEquals(ex.getMessage(), "Class " + CLASS_NAME
+                    + "$FooHolder does not contain a property named 'bar'.");
+        }
+    }
+
+    @Test
+    public void property_type_mismatch()
+    {
+        FooHolder holder = new FooHolder();
+
+        try
+        {
+            _builder.build(holder, "count", Map.class);
+            unreachable();
+        }
+        catch (RuntimeException ex)
+        {
+            assertEquals(ex.getMessage(), "Property 'count' of class " + CLASS_NAME
+                    + "$FooHolder is of type int, which is not assignable to type java.util.Map.");
+        }
+    }
+
+    @Test
+    public void property_write_only()
+    {
+        FooHolder holder = new FooHolder();
+
+        try
+        {
+            _builder.build(holder, "writeOnly", Foo.class);
+            unreachable();
+        }
+        catch (RuntimeException ex)
+        {
+            assertEquals(
+                    ex.getMessage(),
+                    "Class "
+                            + CLASS_NAME
+                            + "$FooHolder does not provide an accessor ('getter') method for property 'writeOnly'.");
+        }
+    }
+}