hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From k...@apache.org
Subject cvs commit: jakarta-hivemind/framework/src/java/org/apache/hivemind/schema/rules SetModuleRule.java
Date Tue, 10 Aug 2004 22:19:27 GMT
knut        2004/08/10 15:19:27

  Modified:    framework/src/test/hivemind/test/parse GenericModule.xml
                        TestDescriptorParser.java
               framework/src/java/org/apache/hivemind/schema/rules
                        SetModuleRule.java
  Log:
  added test for <set-module> rule
  
  Revision  Changes    Path
  1.8       +1 -0      jakarta-hivemind/framework/src/test/hivemind/test/parse/GenericModule.xml
  
  Index: GenericModule.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/hivemind/test/parse/GenericModule.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- GenericModule.xml	25 Jun 2004 20:20:05 -0000	1.7
  +++ GenericModule.xml	10 Aug 2004 22:19:26 -0000	1.8
  @@ -31,6 +31,7 @@
   				<create-object class="package.Foo1"/>
   				<read-attribute property="bazomatic" attribute="bar"/>
   				<read-content property="description"/>
  +				<set-module property="module"/>
   				<invoke-parent method="addElement"/>
   			</rules>
   		</element>
  
  
  
  1.17      +9 -4      jakarta-hivemind/framework/src/test/hivemind/test/parse/TestDescriptorParser.java
  
  Index: TestDescriptorParser.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/test/hivemind/test/parse/TestDescriptorParser.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- TestDescriptorParser.java	3 Aug 2004 14:02:15 -0000	1.16
  +++ TestDescriptorParser.java	10 Aug 2004 22:19:26 -0000	1.17
  @@ -41,6 +41,7 @@
   import org.apache.hivemind.schema.rules.PushAttributeRule;
   import org.apache.hivemind.schema.rules.ReadAttributeRule;
   import org.apache.hivemind.schema.rules.ReadContentRule;
  +import org.apache.hivemind.schema.rules.SetModuleRule;
   import org.apache.hivemind.schema.rules.SetPropertyRule;
   
   /**
  @@ -260,7 +261,7 @@
   
           List rl = em.getRules();
   
  -        assertEquals(4, rl.size());
  +        assertEquals(5, rl.size());
   
           CreateObjectRule rule1 = (CreateObjectRule) rl.get(0);
           assertEquals("package.Foo1", rule1.getClassName());
  @@ -275,10 +276,14 @@
   
           assertEquals("description", rule3.getPropertyName());
   
  -        InvokeParentRule rule4 = (InvokeParentRule) rl.get(3);
  +        SetModuleRule rule4 = (SetModuleRule) rl.get(3);
   
  -        assertEquals("addElement", rule4.getMethodName());
  -    }
  +        assertEquals("module", rule4.getPropertyName());
  +
  +        InvokeParentRule rule5 = (InvokeParentRule) rl.get(4);
  +
  +        assertEquals("addElement", rule5.getMethodName());
  +}
   
       public void testParametersSchema() throws Exception
       {
  
  
  
  1.4       +5 -0      jakarta-hivemind/framework/src/java/org/apache/hivemind/schema/rules/SetModuleRule.java
  
  Index: SetModuleRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-hivemind/framework/src/java/org/apache/hivemind/schema/rules/SetModuleRule.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- SetModuleRule.java	17 Jun 2004 15:16:13 -0000	1.3
  +++ SetModuleRule.java	10 Aug 2004 22:19:27 -0000	1.4
  @@ -42,4 +42,9 @@
           _propertyName = string;
       }
   
  +    public String getPropertyName()
  +    {
  +        return _propertyName;
  +    }
  +
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-cvs-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-cvs-help@jakarta.apache.org


Mime
View raw message