[jboss-cvs] JBossAS SVN: r102038 - in projects/metadata/common/tags: 2.0.0.Alpha14 and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Mar 7 11:16:52 EST 2010


Author: bstansberry at jboss.com
Date: 2010-03-07 11:16:52 -0500 (Sun, 07 Mar 2010)
New Revision: 102038

Added:
   projects/metadata/common/tags/2.0.0.Alpha14/
   projects/metadata/common/tags/2.0.0.Alpha14/pom.xml
   projects/metadata/common/tags/2.0.0.Alpha14/src/main/java/org/jboss/metadata/javaee/jboss/NamedModule.java
   projects/metadata/common/tags/2.0.0.Alpha14/src/main/java/org/jboss/metadata/javaee/support/NamedModuleImpl.java
   projects/metadata/common/tags/2.0.0.Alpha14/src/test/java/org/jboss/test/metadata/javaee/NamedModuleImplUnitTestCase.java
Removed:
   projects/metadata/common/tags/2.0.0.Alpha14/pom.xml
Log:
[maven-release-plugin]  copy for tag 2.0.0.Alpha14

Copied: projects/metadata/common/tags/2.0.0.Alpha14 (from rev 102035, projects/metadata/common/trunk)

Deleted: projects/metadata/common/tags/2.0.0.Alpha14/pom.xml
===================================================================
--- projects/metadata/common/trunk/pom.xml	2010-03-07 13:52:39 UTC (rev 102035)
+++ projects/metadata/common/tags/2.0.0.Alpha14/pom.xml	2010-03-07 16:16:52 UTC (rev 102038)
@@ -1,221 +0,0 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <modelVersion>4.0.0</modelVersion>
-  <parent>
-    <groupId>org.jboss</groupId>
-    <artifactId>jboss-parent</artifactId>
-    <version>4.0.CR1</version>
-  </parent>
-  <groupId>org.jboss.metadata</groupId>
-  <artifactId>jboss-metadata-common</artifactId>
-  <packaging>jar</packaging>
-  <version>2.0.0-SNAPSHOT</version>
-  <name>JBoss Metadata Common</name>
-  <url>http://www.jboss.org</url>
-  <description>The common JavaEE metadata classes</description>
-  <scm>
-    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/metadata/common/trunk</connection>
-    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/metadata/common/trunk</developerConnection>
-  </scm>
-
-  <build>
-    <outputDirectory>${profile.outputDirectory}</outputDirectory>
-    <testOutputDirectory>${profile.testOutputDirectory}</testOutputDirectory>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.4.3</version>
-        <configuration>
-          <printSummary>true</printSummary>
-          <disableXmlReport>false</disableXmlReport>
-          <redirectTestOutputToFile>true</redirectTestOutputToFile>
-           <testFailureIgnore>false</testFailureIgnore>
-          <includes>
-            <include>**/*TestCase.java</include>
-          </includes>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-jar-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>test-jar</goal>
-            </goals>
-            <configuration>
-               <excludes>
-                  <exclude>org/jboss/test/metadata/javaee/*TestCase.class</exclude>
-                  <exclude>org/jboss/test/metadata/javaee/*TestCase$*.class</exclude>
-                  <exclude>org/jboss/test/metadata/javaee/*.xml</exclude>
-               </excludes>
-            </configuration> 
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-source-plugin</artifactId>
-        <executions>
-          <execution>
-            <goals>
-              <goal>test-jar</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
-  </build>
-
-  <repositories>
-    <repository>
-      <id>repository.jboss.org</id>
-      <name>JBoss Repository</name>
-      <layout>default</layout>
-      <url>http://repository.jboss.org/maven2/</url>
-      <snapshots>
-        <enabled>false</enabled>
-      </snapshots>
-    </repository>
-    <repository>
-      <id>snapshots.jboss.org</id>
-      <name>JBoss Snapshot Repository</name>
-      <layout>default</layout>
-      <url>http://snapshots.jboss.org/maven2/</url>
-      <releases>
-        <enabled>false</enabled>
-      </releases>
-      <snapshots>
-        <enabled>true</enabled>
-      </snapshots>
-    </repository>
-  </repositories>
-
-  <!-- 
-    Eclipse settings have been removed from parent. This needs to be
-    done via an eclipse profile.
-    http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085896#4085896 
-    -->
-  <profiles>
-    <profile>
-      <id>default</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
-      <properties>
-        <profile.outputDirectory>target/classes</profile.outputDirectory>
-        <profile.testOutputDirectory>target/tests-classes</profile.testOutputDirectory>
-      </properties>
-    </profile>
-    
-    <profile>
-      <id>eclipse</id>
-      <properties>
-        <profile.outputDirectory>eclipse-target/classes</profile.outputDirectory>
-        <profile.testOutputDirectory>eclipse-target/tests-classes</profile.testOutputDirectory>
-      </properties>
-    </profile>
-  </profiles>
-
-  <!-- Compile Dependencies -->
-  <dependencies>
-
-    <dependency>
-      <groupId>org.jboss.logging</groupId>
-      <artifactId>jboss-logging-spi</artifactId>
-      <version>2.2.0.CR1</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-common-core</artifactId>
-      <version>2.2.14.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss.javaee</groupId>
-      <artifactId>jboss-ejb-api</artifactId>
-      <version>3.0.0.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.hibernate</groupId>
-      <artifactId>ejb3-persistence</artifactId>
-      <version>1.0.2.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss.javaee</groupId>
-      <artifactId>jboss-jms-api</artifactId>
-      <version>1.1.0.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss.ws</groupId>
-      <artifactId>jbossws-spi</artifactId>
-      <version>1.3.0.Beta4</version>
-    </dependency>
-
-    <dependency>
-      <groupId>jboss.jbossws</groupId>
-      <artifactId>jboss-jaxws</artifactId>
-      <version>3.0.1-native-2.0.4.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jbossxb</artifactId>
-      <version>2.0.2.Beta1</version>
-      <exclusions>
-        <exclusion>
-          <groupId>jboss</groupId>
-          <artifactId>jboss-common-logging-spi</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>javax.xml.bind</groupId>
-          <artifactId>jaxb-api</artifactId>
-        </exclusion>          
-      </exclusions>       
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-vfs</artifactId>
-      <version>3.0.0.CR1</version>    
-    </dependency>
-
-    <dependency>
-      <groupId>org.jboss</groupId>
-      <artifactId>jboss-mdr</artifactId>
-      <version>2.0.0.GA</version>
-    </dependency>
-
-    <dependency>
-      <groupId>sun-jaxb</groupId>
-      <artifactId>jaxb-api</artifactId>
-      <version>2.1.4</version>
-   </dependency>
-      
-    <dependency>
-      <groupId>apache-xerces</groupId>
-      <artifactId>xml-apis</artifactId>
-      <version>2.9.1</version>    
-    </dependency>
-    
-    <!-- Test Dependencies -->
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.4</version>
-      <scope>test</scope>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.jboss.test</groupId>
-      <artifactId>jboss-test</artifactId>
-      <version>1.1.4.GA</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-</project>

Copied: projects/metadata/common/tags/2.0.0.Alpha14/pom.xml (from rev 102037, projects/metadata/common/trunk/pom.xml)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha14/pom.xml	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha14/pom.xml	2010-03-07 16:16:52 UTC (rev 102038)
@@ -0,0 +1,221 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.jboss</groupId>
+    <artifactId>jboss-parent</artifactId>
+    <version>4.0.CR1</version>
+  </parent>
+  <groupId>org.jboss.metadata</groupId>
+  <artifactId>jboss-metadata-common</artifactId>
+  <packaging>jar</packaging>
+  <version>2.0.0.Alpha14</version>
+  <name>JBoss Metadata Common</name>
+  <url>http://www.jboss.org</url>
+  <description>The common JavaEE metadata classes</description>
+  <scm>
+    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/metadata/common/tags/2.0.0.Alpha14</connection>
+    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/metadata/common/tags/2.0.0.Alpha14</developerConnection>
+  </scm>
+
+  <build>
+    <outputDirectory>${profile.outputDirectory}</outputDirectory>
+    <testOutputDirectory>${profile.testOutputDirectory}</testOutputDirectory>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.4.3</version>
+        <configuration>
+          <printSummary>true</printSummary>
+          <disableXmlReport>false</disableXmlReport>
+          <redirectTestOutputToFile>true</redirectTestOutputToFile>
+           <testFailureIgnore>false</testFailureIgnore>
+          <includes>
+            <include>**/*TestCase.java</include>
+          </includes>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-jar-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+            <configuration>
+               <excludes>
+                  <exclude>org/jboss/test/metadata/javaee/*TestCase.class</exclude>
+                  <exclude>org/jboss/test/metadata/javaee/*TestCase$*.class</exclude>
+                  <exclude>org/jboss/test/metadata/javaee/*.xml</exclude>
+               </excludes>
+            </configuration> 
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-source-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>test-jar</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <repositories>
+    <repository>
+      <id>repository.jboss.org</id>
+      <name>JBoss Repository</name>
+      <layout>default</layout>
+      <url>http://repository.jboss.org/maven2/</url>
+      <snapshots>
+        <enabled>false</enabled>
+      </snapshots>
+    </repository>
+    <repository>
+      <id>snapshots.jboss.org</id>
+      <name>JBoss Snapshot Repository</name>
+      <layout>default</layout>
+      <url>http://snapshots.jboss.org/maven2/</url>
+      <releases>
+        <enabled>false</enabled>
+      </releases>
+      <snapshots>
+        <enabled>true</enabled>
+      </snapshots>
+    </repository>
+  </repositories>
+
+  <!-- 
+    Eclipse settings have been removed from parent. This needs to be
+    done via an eclipse profile.
+    http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4085896#4085896 
+    -->
+  <profiles>
+    <profile>
+      <id>default</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <properties>
+        <profile.outputDirectory>target/classes</profile.outputDirectory>
+        <profile.testOutputDirectory>target/tests-classes</profile.testOutputDirectory>
+      </properties>
+    </profile>
+    
+    <profile>
+      <id>eclipse</id>
+      <properties>
+        <profile.outputDirectory>eclipse-target/classes</profile.outputDirectory>
+        <profile.testOutputDirectory>eclipse-target/tests-classes</profile.testOutputDirectory>
+      </properties>
+    </profile>
+  </profiles>
+
+  <!-- Compile Dependencies -->
+  <dependencies>
+
+    <dependency>
+      <groupId>org.jboss.logging</groupId>
+      <artifactId>jboss-logging-spi</artifactId>
+      <version>2.2.0.CR1</version>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-common-core</artifactId>
+      <version>2.2.14.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.javaee</groupId>
+      <artifactId>jboss-ejb-api</artifactId>
+      <version>3.0.0.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.hibernate</groupId>
+      <artifactId>ejb3-persistence</artifactId>
+      <version>1.0.2.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.javaee</groupId>
+      <artifactId>jboss-jms-api</artifactId>
+      <version>1.1.0.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss.ws</groupId>
+      <artifactId>jbossws-spi</artifactId>
+      <version>1.3.0.Beta4</version>
+    </dependency>
+
+    <dependency>
+      <groupId>jboss.jbossws</groupId>
+      <artifactId>jboss-jaxws</artifactId>
+      <version>3.0.1-native-2.0.4.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jbossxb</artifactId>
+      <version>2.0.2.Beta1</version>
+      <exclusions>
+        <exclusion>
+          <groupId>jboss</groupId>
+          <artifactId>jboss-common-logging-spi</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>javax.xml.bind</groupId>
+          <artifactId>jaxb-api</artifactId>
+        </exclusion>          
+      </exclusions>       
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-vfs</artifactId>
+      <version>3.0.0.CR1</version>    
+    </dependency>
+
+    <dependency>
+      <groupId>org.jboss</groupId>
+      <artifactId>jboss-mdr</artifactId>
+      <version>2.0.0.GA</version>
+    </dependency>
+
+    <dependency>
+      <groupId>sun-jaxb</groupId>
+      <artifactId>jaxb-api</artifactId>
+      <version>2.1.4</version>
+   </dependency>
+      
+    <dependency>
+      <groupId>apache-xerces</groupId>
+      <artifactId>xml-apis</artifactId>
+      <version>2.9.1</version>    
+    </dependency>
+    
+    <!-- Test Dependencies -->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.4</version>
+      <scope>test</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.jboss.test</groupId>
+      <artifactId>jboss-test</artifactId>
+      <version>1.1.4.GA</version>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+</project>

Copied: projects/metadata/common/tags/2.0.0.Alpha14/src/main/java/org/jboss/metadata/javaee/jboss/NamedModule.java (from rev 102036, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/jboss/NamedModule.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha14/src/main/java/org/jboss/metadata/javaee/jboss/NamedModule.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha14/src/main/java/org/jboss/metadata/javaee/jboss/NamedModule.java	2010-03-07 16:16:52 UTC (rev 102038)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.metadata.javaee.jboss;
+
+/**
+ * Information about an EE module's name as discussed in EE 6 Section EE.8.1.1.
+ *
+ * @author Brian Stansberry
+ * 
+ * @version $Revision$
+ */
+public interface NamedModule
+{
+   /**
+    * Gets the name of the module as configured in its deployment descriptor.
+    * 
+    * @return the name, or <code>null</code> if no module name was configured
+    *         in the deployment descriptor
+    */
+   String getModuleName();
+   
+   /**
+    * Sets the name of the module as configured in its deployment descriptor.
+    * 
+    * param moduleName the name as configured in the deployment descriptor
+    */
+   void setModuleName(String moduleName);
+}

Copied: projects/metadata/common/tags/2.0.0.Alpha14/src/main/java/org/jboss/metadata/javaee/support/NamedModuleImpl.java (from rev 102036, projects/metadata/common/trunk/src/main/java/org/jboss/metadata/javaee/support/NamedModuleImpl.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha14/src/main/java/org/jboss/metadata/javaee/support/NamedModuleImpl.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha14/src/main/java/org/jboss/metadata/javaee/support/NamedModuleImpl.java	2010-03-07 16:16:52 UTC (rev 102038)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat, Inc. and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.metadata.javaee.support;
+
+import org.jboss.metadata.javaee.jboss.NamedModule;
+
+/**
+ * Base class for metadata classes that include both a module name and a
+ * description group.
+ *
+ * @author Brian Stansberry
+ * 
+ * @version $Revision$
+ */
+public abstract class NamedModuleImpl extends IdMetaDataImplWithDescriptionGroup implements NamedModule
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 6848308773842846138L;
+   
+   private String moduleName;
+
+   public String getModuleName()
+   {
+      return moduleName;
+   }
+
+   public void setModuleName(String moduleName)
+   {
+      this.moduleName = moduleName;
+   }  
+
+   public void merge(NamedModuleImpl override,
+         NamedModuleImpl original)
+   {
+      super.merge(override, original);   
+      mergeModuleName(override, original);
+   }
+   
+   public void mergeModuleName(NamedModule override, NamedModule original)
+   {
+      if(override != null && override.getModuleName() != null)
+         setModuleName(override.getModuleName());
+      else if(original != null && original.getModuleName() != null)
+         setModuleName(original.getModuleName());
+   }
+
+}

Copied: projects/metadata/common/tags/2.0.0.Alpha14/src/test/java/org/jboss/test/metadata/javaee/NamedModuleImplUnitTestCase.java (from rev 102036, projects/metadata/common/trunk/src/test/java/org/jboss/test/metadata/javaee/NamedModuleImplUnitTestCase.java)
===================================================================
--- projects/metadata/common/tags/2.0.0.Alpha14/src/test/java/org/jboss/test/metadata/javaee/NamedModuleImplUnitTestCase.java	                        (rev 0)
+++ projects/metadata/common/tags/2.0.0.Alpha14/src/test/java/org/jboss/test/metadata/javaee/NamedModuleImplUnitTestCase.java	2010-03-07 16:16:52 UTC (rev 102038)
@@ -0,0 +1,83 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2010, Red Hat, Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.metadata.javaee;
+
+import junit.framework.TestCase;
+
+import org.jboss.metadata.javaee.spec.DescriptionGroupMetaData;
+import org.jboss.metadata.javaee.spec.DisplayNameImpl;
+import org.jboss.metadata.javaee.spec.DisplayNamesImpl;
+import org.jboss.metadata.javaee.support.NamedModuleImpl;
+
+
+/**
+ * Unit tests of NamedModuleImpl.
+ * 
+ * @author Brian Stansberry
+ * @version $Revision: 1.1 $
+ */
+public class NamedModuleImplUnitTestCase extends TestCase
+{
+   private static class ConcreteNamedModule extends NamedModuleImpl
+   {
+      private ConcreteNamedModule()
+      {         
+      }
+      
+      private ConcreteNamedModule(String name)
+      {
+         setModuleName(name);
+         setId(name);
+         DisplayNameImpl dm = new DisplayNameImpl();
+         dm.setDisplayName(name);
+         DisplayNamesImpl names = new DisplayNamesImpl();
+         names.add(dm);
+         DescriptionGroupMetaData dgm = new DescriptionGroupMetaData();
+         dgm.setDisplayNames(names);
+         setDescriptionGroup(dgm);
+      }
+   }
+   
+   private static final ConcreteNamedModule A = new ConcreteNamedModule("A");
+   private static final ConcreteNamedModule B = new ConcreteNamedModule("B");
+   
+   public void testMerge()
+   {
+      ConcreteNamedModule testee = new ConcreteNamedModule();
+      testee.merge(A, B);
+      checkValues(testee, "A");
+      
+      testee = new ConcreteNamedModule();
+      testee.merge(B, A);
+      checkValues(testee, "B");      
+   }
+
+   private void checkValues(ConcreteNamedModule testee, String expected)
+   {
+      assertEquals(expected, testee.getModuleName());
+      assertEquals(expected, testee.getId());
+      assertNotNull(testee.getDescriptionGroup());
+      assertEquals(expected, testee.getDescriptionGroup().getDisplayName());
+   }
+   
+   
+}




More information about the jboss-cvs-commits mailing list