hivemind-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahue...@apache.org
Subject svn commit: r438072 - in /hivemind/branches/branch-2-0-annot: framework/ xml/ xml/src/java/org/apache/hivemind/schema/rules/ xml/src/test/hivemind/test/rules/ xml/src/test/org/apache/hivemind/impl/ xml/src/test/org/apache/hivemind/service/
Date Tue, 29 Aug 2006 13:38:03 GMT
Author: ahuegen
Date: Tue Aug 29 06:38:03 2006
New Revision: 438072

URL: http://svn.apache.org/viewvc?rev=438072&view=rev
Log:
xml unit tests now use framework tests for compile with maven
Fixed some xml tests

Modified:
    hivemind/branches/branch-2-0-annot/framework/pom.xml
    hivemind/branches/branch-2-0-annot/xml/pom.xml
    hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/rules/RulesMessages.java
    hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestInvokeParentRule.java
    hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestSetPropertyRule.java
    hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java
    hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestSchemaProcessor.java
    hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/service/EventRegister.xml

Modified: hivemind/branches/branch-2-0-annot/framework/pom.xml
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/framework/pom.xml?rev=438072&r1=438071&r2=438072&view=diff
==============================================================================
--- hivemind/branches/branch-2-0-annot/framework/pom.xml (original)
+++ hivemind/branches/branch-2-0-annot/framework/pom.xml Tue Aug 29 06:38:03 2006
@@ -70,4 +70,20 @@
         <connection>svn:http://svn.apache.org/repos/asf/jakarta/hivemind/trunk/framework</connection>
         <url>http://svn.apache.org/viewvc/jakarta/hivemind/trunk/framework</url>
     </scm>
+	<build>
+	    <plugins>
+	     <plugin>
+	       <groupId>org.apache.maven.plugins</groupId>
+	       <artifactId>maven-jar-plugin</artifactId>
+	       <executions>
+	         <execution>
+	           <goals>
+	             <!-- Create jar with unit tests, so they can be reused by the other modules
-->
+	             <goal>test-jar</goal>
+	           </goals>
+	         </execution>
+	       </executions>
+	     </plugin>
+	    </plugins>
+  	</build>
 </project>

Modified: hivemind/branches/branch-2-0-annot/xml/pom.xml
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/xml/pom.xml?rev=438072&r1=438071&r2=438072&view=diff
==============================================================================
--- hivemind/branches/branch-2-0-annot/xml/pom.xml (original)
+++ hivemind/branches/branch-2-0-annot/xml/pom.xml Tue Aug 29 06:38:03 2006
@@ -21,6 +21,12 @@
             <version>2.0.0_M1</version>
         </dependency>
         <dependency>
+            <groupId>org.apache.hivemind</groupId>
+            <artifactId>hivemind</artifactId>
+            <version>2.0.0_M1</version>
+            <type>test-jar</type>
+        </dependency>
+        <dependency>
             <groupId>log4j</groupId>
             <artifactId>log4j</artifactId>
         </dependency>
@@ -45,6 +51,11 @@
             <groupId>ant</groupId>
             <artifactId>ant</artifactId>
             <version>1.6.3</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
             <scope>provided</scope>
         </dependency>
     </dependencies>

Modified: hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/rules/RulesMessages.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/rules/RulesMessages.java?rev=438072&r1=438071&r2=438072&view=diff
==============================================================================
--- hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/rules/RulesMessages.java
(original)
+++ hivemind/branches/branch-2-0-annot/xml/src/java/org/apache/hivemind/schema/rules/RulesMessages.java
Tue Aug 29 06:38:03 2006
@@ -93,7 +93,7 @@
             Throwable cause)
     {
         return _formatter.format("error-invoking-method", new Object[]
-        { methodName, parent, location, cause });
+        { methodName, parent.getClass().getName(), location, cause });
     }
 
     public static String invalidLongValue(String inputValue)

Modified: hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestInvokeParentRule.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestInvokeParentRule.java?rev=438072&r1=438071&r2=438072&view=diff
==============================================================================
--- hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestInvokeParentRule.java
(original)
+++ hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestInvokeParentRule.java
Tue Aug 29 06:38:03 2006
@@ -14,8 +14,6 @@
 
 package hivemind.test.rules;
 
-import hivemind.test.FrameworkTestCase;
-
 import java.util.List;
 
 import org.apache.hivemind.ApplicationRuntimeException;
@@ -44,7 +42,7 @@
         {
             assertExceptionSubstring(
                     ex,
-                    "Unable to construct configuration hivemind.test.rules.InvokeFailure:
Error invoking method failure on org.apache.hivemind.impl.SchemaProcessorImpl");
+                    "Unable to construct configuration hivemind.test.rules.InvokeFailure:
Error invoking method failure on java.util.ArrayList");
 
             Throwable inner = findNestedException(ex);
             assertExceptionSubstring(inner, "failure");
@@ -59,7 +57,7 @@
         MockControl procControl = newControl(SchemaProcessor.class);
         SchemaProcessor proc = (SchemaProcessor) procControl.getMock();
 
-        proc.peek();
+        proc.peek(0); 
         procControl.setReturnValue(null);
 
         MockControl listControl = newControl(List.class);
@@ -81,7 +79,7 @@
 
         rule = new InvokeParentRule("get");
 
-        proc.peek();
+        proc.peek(0);
         procControl.setReturnValue(null);
 
         proc.peek(1);

Modified: hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestSetPropertyRule.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestSetPropertyRule.java?rev=438072&r1=438071&r2=438072&view=diff
==============================================================================
--- hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestSetPropertyRule.java
(original)
+++ hivemind/branches/branch-2-0-annot/xml/src/test/hivemind/test/rules/TestSetPropertyRule.java
Tue Aug 29 06:38:03 2006
@@ -17,7 +17,6 @@
 import java.util.List;
 
 import org.apache.hivemind.Registry;
-import org.apache.hivemind.test.HiveMindTestCase;
 import org.apache.hivemind.xml.XmlTestCase;
 
 /**

Modified: hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java?rev=438072&r1=438071&r2=438072&view=diff
==============================================================================
--- hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java
(original)
+++ hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestInvokeFactoryServiceConstructor.java
Tue Aug 29 06:38:03 2006
@@ -22,6 +22,7 @@
 import java.util.List;
 
 import org.apache.hivemind.ErrorLog;
+import org.apache.hivemind.Location;
 import org.apache.hivemind.Occurances;
 import org.apache.hivemind.Registry;
 import org.apache.hivemind.ServiceImplementationFactory;
@@ -30,7 +31,6 @@
 import org.apache.hivemind.internal.Module;
 import org.apache.hivemind.internal.ServicePoint;
 import org.apache.hivemind.schema.impl.SchemaImpl;
-import org.apache.hivemind.test.HiveMindTestCase;
 import org.apache.hivemind.xml.XmlTestCase;
 import org.easymock.MockControl;
 
@@ -66,7 +66,8 @@
         MockControl xmlRegistryNatureControl = newControl(XmlRegistryNature.class);
         XmlRegistryNature xmlRegistryNature = (XmlRegistryNature) xmlRegistryNatureControl.getMock();
 
-        InvokeFactoryServiceConstructor c = new InvokeFactoryServiceConstructor(newLocation(),
"module");
+        Location location = newLocation();
+        InvokeFactoryServiceConstructor c = new InvokeFactoryServiceConstructor(location,
"module");
 
         ErrorLog log = (ErrorLog) newMock(ErrorLog.class);
 
@@ -99,7 +100,7 @@
         String message = XmlImplMessages
                 .wrongNumberOfParameters("foo.bar.Baz", 0, Occurances.REQUIRED);
 
-        log.error(message, null, null);
+        log.error(message, location, null);
 
         factory.createCoreServiceImplementation(new ServiceImplementationFactoryParametersImpl(
                 point, module, Collections.EMPTY_LIST));

Modified: hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestSchemaProcessor.java
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestSchemaProcessor.java?rev=438072&r1=438071&r2=438072&view=diff
==============================================================================
--- hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestSchemaProcessor.java
(original)
+++ hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/impl/TestSchemaProcessor.java
Tue Aug 29 06:38:03 2006
@@ -34,7 +34,6 @@
 import org.apache.hivemind.schema.impl.AttributeModelImpl;
 import org.apache.hivemind.schema.impl.ElementModelImpl;
 import org.apache.hivemind.schema.impl.SchemaImpl;
-import org.apache.hivemind.schema.rules.AddToMapRule;
 import org.apache.hivemind.schema.rules.CreateObjectRule;
 import org.apache.hivemind.schema.rules.InvokeParentRule;
 import org.apache.hivemind.schema.rules.NullTranslator;
@@ -144,15 +143,15 @@
 
         List elements = Collections.singletonList(element);
 
+        m.getModule(schema.getDefiningModuleId());
+        control.setReturnValue(m);
+        
         m.resolveType("hivemind.test.services.impl.StringHolderImpl");
         control.setReturnValue(StringHolderImpl.class);
 
         m.expandSymbols("flintstone", null);
         control.setReturnValue("flintstone");
 
-        m.getModule("module");
-        control.setReturnValue(m);
-        
         replayControls();
 
         List dest = new ArrayList();
@@ -235,10 +234,6 @@
     public void testStackEmpty()
     {
         SchemaProcessor sp = new SchemaProcessorImpl(null, null);
-
-        // The sp is pushed onto the stack itself
-
-        sp.pop();
 
         try
         {

Modified: hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/service/EventRegister.xml
URL: http://svn.apache.org/viewvc/hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/service/EventRegister.xml?rev=438072&r1=438071&r2=438072&view=diff
==============================================================================
--- hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/service/EventRegister.xml
(original)
+++ hivemind/branches/branch-2-0-annot/xml/src/test/org/apache/hivemind/service/EventRegister.xml
Tue Aug 29 06:38:03 2006
@@ -17,13 +17,13 @@
 
 <module id="hivemind.test.services" version="1.0.0">
 
-  <service-point id="ZapEventProducer" interface="org.apache.hivemind.services.ZapEventProducer">
-    <create-instance class="org.apache.hivemind.services.impl.ZapEventProducerImpl"/>
+  <service-point id="ZapEventProducer" interface="hivemind.test.services.ZapEventProducer">
+    <create-instance class="hivemind.test.services.impl.ZapEventProducerImpl"/>
   </service-point>
 
-  <service-point id="ZapEventConsumer" interface="org.apache.hivemind.services.ZapEventConsumer">
+  <service-point id="ZapEventConsumer" interface="hivemind.test.services.ZapEventConsumer">
   	<invoke-factory>
-  		<construct class="org.apache.hivemind.services.impl.ZapEventConsumerImpl">
+  		<construct class="hivemind.test.services.impl.ZapEventConsumerImpl">
   		  <event-listener service-id="ZapEventProducer"/>	
   		</construct>	
   	</invoke-factory>	



Mime
View raw message