[seam-commits] Seam SVN: r15004 - in branches/community/Seam_2_3/seam-integration-tests/src/test: resources/WEB-INF and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Fri Jul 27 07:14:28 EDT 2012


Author: maschmid
Date: 2012-07-27 07:14:27 -0400 (Fri, 27 Jul 2012)
New Revision: 15004

Modified:
   branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component1.java
   branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component2.java
   branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/PrecedenceComponentTest.java
   branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components-precedence.xml
Log:
JBSEAM-3138 update PrecedenceComponentTest to verify default values behavior


Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component1.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component1.java	2012-07-26 07:24:17 UTC (rev 15003)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component1.java	2012-07-27 11:14:27 UTC (rev 15004)
@@ -5,7 +5,8 @@
 {
    
    private String name;
-   
+   private String defaultValue = "Component1default";
+
    public String getName()
    {
       return name;
@@ -15,5 +16,14 @@
    {
       this.name = name;
    }
-   
+
+   public String getDefaultValue()
+   {
+      return defaultValue;
+   }
+
+   public void setDefaultValue(String defaultValue)
+   {
+      this.defaultValue = defaultValue;
+   }
 }

Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component2.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component2.java	2012-07-26 07:24:17 UTC (rev 15003)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/Component2.java	2012-07-27 11:14:27 UTC (rev 15004)
@@ -4,6 +4,7 @@
 {
    
    private String name;
+   private String defaultValue = "Component2default";
    
    public String getName()
    {
@@ -14,5 +15,15 @@
    {
       this.name = name;
    }
+
+   public String getDefaultValue()
+   {
+      return defaultValue;
+   }
+
+   public void setDefaultValue(String defaultValue)
+   {
+      this.defaultValue = defaultValue;
+   }
    
 }

Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/PrecedenceComponentTest.java
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/PrecedenceComponentTest.java	2012-07-26 07:24:17 UTC (rev 15003)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/java/org/jboss/seam/test/integration/PrecedenceComponentTest.java	2012-07-27 11:14:27 UTC (rev 15004)
@@ -47,7 +47,8 @@
                  Assert.fail("component is not expected Component2.class");
               }
               Component2 myPrecedenceComponent = (Component2) component;
-              Assert.assertEquals(myPrecedenceComponent.getName(), "Component1High");
+              Assert.assertEquals("Component1High", myPrecedenceComponent.getName());
+              Assert.assertEquals("Component2default", myPrecedenceComponent.getDefaultValue());
           }   
        }.run();
     }

Modified: branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components-precedence.xml
===================================================================
--- branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components-precedence.xml	2012-07-26 07:24:17 UTC (rev 15003)
+++ branches/community/Seam_2_3/seam-integration-tests/src/test/resources/WEB-INF/components-precedence.xml	2012-07-27 11:14:27 UTC (rev 15004)
@@ -1,17 +1,18 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <components xmlns="http://jboss.org/schema/seam/components"
-            xmlns:core="http://jboss.org/schema/seam/core"            
+            xmlns:core="http://jboss.org/schema/seam/core"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://jboss.org/schema/seam/core http://jboss.org/schema/seam/core-2.3.xsd">
-    
+
     <core:init debug="false" jndi-pattern="java:app/test/#{ejbName}" />
 
     <component name="component1" class="org.jboss.seam.test.integration.Component2" precedence="30">
         <property name="name">Component1High</property>
     </component>
-    
+
     <component name="component1" class="org.jboss.seam.test.integration.Component1" precedence="10">
         <property name="name">Component1Low</property>
-    </component>                       
+        <property name="defaultValue">Component1override</property>
+    </component>
 
 </components>



More information about the seam-commits mailing list