Update of /cvsroot/xdoclet/xdoclet2/src/test/java/xdoclet
In directory sc8-pr-cvs1:/tmp/cvs-serv25581/src/test/java/xdoclet

Modified Files:
        AcceptTest.java ClasspathManagerTest.java 
        PackageSubstitutionTest.java PluginTest.java PropertyTest.java 
        XDocletTest.java 
Log Message:
Coding conventions.

Index: AcceptTest.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/test/java/xdoclet/AcceptTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** AcceptTest.java     5 Mar 2003 10:02:27 -0000       1.2
--- AcceptTest.java     7 Mar 2003 08:50:46 -0000       1.3
***************
*** 2,7 ****
  
  import junit.framework.TestCase;
- import xdoclet.util.predicates.*;
  import org.apache.commons.collections.Predicate;
  
  /**
--- 2,7 ----
  
  import junit.framework.TestCase;
  import org.apache.commons.collections.Predicate;
+ import xdoclet.util.predicates.Or;
  
  /**
***************
*** 11,26 ****
   * @author <a href="mailto:[EMAIL PROTECTED]">Mathias Bogaert</a>
   */
! public class AcceptTest extends TestCase
! {
!     public AcceptTest(String s)
!     {
          super(s);
      }
  
!     public void testAccept() throws XDocletException
!     {
          Accept accept = new Accept();
          Predicate or = (Predicate) accept.createElement("or");
!         if (! (or instanceof Or))
              fail("Returned predicate of accept.createElement(or) is not instanceof 
Or");
  
--- 11,23 ----
   * @author <a href="mailto:[EMAIL PROTECTED]">Mathias Bogaert</a>
   */
! public class AcceptTest extends TestCase {
!     public AcceptTest(String s) {
          super(s);
      }
  
!     public void testAccept() throws XDocletException {
          Accept accept = new Accept();
          Predicate or = (Predicate) accept.createElement("or");
!         if (!(or instanceof Or))
              fail("Returned predicate of accept.createElement(or) is not instanceof 
Or");
  

Index: ClasspathManagerTest.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/test/java/xdoclet/ClasspathManagerTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** ClasspathManagerTest.java   5 Mar 2003 10:02:27 -0000       1.2
--- ClasspathManagerTest.java   7 Mar 2003 08:50:46 -0000       1.3
***************
*** 2,5 ****
--- 2,8 ----
  
  import junit.framework.TestCase;
+ import org.apache.commons.collections.CollectionUtils;
+ import xdoclet.util.ClasspathManager;
+ import xdoclet.util.FileUtils;
  
  import java.io.File;
***************
*** 8,16 ****
  import java.util.Iterator;
  
- import xdoclet.util.FileUtils;
- import xdoclet.util.ClasspathManager;
- import xdoclet.XDoclet;
- import org.apache.commons.collections.CollectionUtils;
- 
  /**
   * Test for ClasspathManager and XDoclet.
--- 11,14 ----
***************
*** 19,37 ****
   * @version $Revision$
   */
! public class ClasspathManagerTest extends TestCase
! {
      /**
       * Filters out jar files. Used to filter out plugin jar files.
       */
!     private static final FileFilter jarFilter = new FileFilter()
!     {
!         public boolean accept(File file)
!         {
              return file.getName().endsWith(".jar") && FileUtils.isJar(file);
          }
      };
  
!     public void setUp()
!     {
          // Set XDoclet's classpath to be only that of the test plugin.
  
--- 17,31 ----
   * @version $Revision$
   */
! public class ClasspathManagerTest extends TestCase {
      /**
       * Filters out jar files. Used to filter out plugin jar files.
       */
!     private static final FileFilter jarFilter = new FileFilter() {
!         public boolean accept(File file) {
              return file.getName().endsWith(".jar") && FileUtils.isJar(file);
          }
      };
  
!     public void setUp() {
          // Set XDoclet's classpath to be only that of the test plugin.
  
***************
*** 50,60 ****
      }
  
!     public void testGetJars()
!     {
          assertEquals(1, XDoclet.getClasspathManager().getJars().size());
      }
  
!     public void testGetMetaData()
!     {
          // the metadata for XDoclet - the "root" element.
          //        ConfigMeta xdocletMeta = XDoclet.getConfigMeta();
--- 44,52 ----
      }
  
!     public void testGetJars() {
          assertEquals(1, XDoclet.getClasspathManager().getJars().size());
      }
  
!     public void testGetMetaData() {
          // the metadata for XDoclet - the "root" element.
          //        ConfigMeta xdocletMeta = XDoclet.getConfigMeta();
***************
*** 65,70 ****
      }
  
!     public void testGetClassesFromClasspath()
!     {
          Collection classes = XDoclet.getClasspathManager().getClassesFromClasspath();
          Collection pluginClasses = CollectionUtils.select(classes, new 
ClasspathManager.AssignableFromPredicate(Plugin.class));
--- 57,61 ----
      }
  
!     public void testGetClassesFromClasspath() {
          Collection classes = XDoclet.getClasspathManager().getClassesFromClasspath();
          Collection pluginClasses = CollectionUtils.select(classes, new 
ClasspathManager.AssignableFromPredicate(Plugin.class));

Index: PackageSubstitutionTest.java
===================================================================
RCS file: 
/cvsroot/xdoclet/xdoclet2/src/test/java/xdoclet/PackageSubstitutionTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** PackageSubstitutionTest.java        5 Mar 2003 10:02:27 -0000       1.3
--- PackageSubstitutionTest.java        7 Mar 2003 08:50:46 -0000       1.4
***************
*** 10,17 ****
   * @version $Revision$
   */
! public class PackageSubstitutionTest extends TestCase
! {
!     public void testNullPackageNameMatch()
!     {
          PackageSubstitution sub = new PackageSubstitution();
          try {
--- 10,15 ----
   * @version $Revision$
   */
! public class PackageSubstitutionTest extends TestCase {
!     public void testNullPackageNameMatch() {
          PackageSubstitution sub = new PackageSubstitution();
          try {
***************
*** 36,41 ****
      }
  
!     public void testGetSubstitutedPackageNameMatchCase()
!     {
          PackageSubstitution sub = new PackageSubstitution();
          sub.setFrom("foo.BAR");
--- 34,38 ----
      }
  
!     public void testGetSubstitutedPackageNameMatchCase() {
          PackageSubstitution sub = new PackageSubstitution();
          sub.setFrom("foo.BAR");
***************
*** 45,50 ****
      }
  
!     public void testGetSubstitutedPackageNameMatch()
!     {
          PackageSubstitution sub = new PackageSubstitution();
          sub.setFrom("foo.bar");
--- 42,46 ----
      }
  
!     public void testGetSubstitutedPackageNameMatch() {
          PackageSubstitution sub = new PackageSubstitution();
          sub.setFrom("foo.bar");
***************
*** 54,59 ****
      }
  
!     public void testGetSubstitutedPackageNameNoMatch()
!     {
          PackageSubstitution sub = new PackageSubstitution();
          sub.setFrom("foo.bar");
--- 50,54 ----
      }
  
!     public void testGetSubstitutedPackageNameNoMatch() {
          PackageSubstitution sub = new PackageSubstitution();
          sub.setFrom("foo.bar");

Index: PluginTest.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/test/java/xdoclet/PluginTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** PluginTest.java     5 Mar 2003 10:02:27 -0000       1.2
--- PluginTest.java     7 Mar 2003 08:50:46 -0000       1.3
***************
*** 9,26 ****
   * @author <a href="mailto:[EMAIL PROTECTED]">Mathias Bogaert</a>
   */
! public class PluginTest extends TestCase
! {
      private Plugin plugin = null;
  
!     public PluginTest(String s)
!     {
          super(s);
      }
  
!     protected void setUp() throws Exception
!     {
          plugin = new Plugin();
      }
  
!     public void testDummy() {}
  }
--- 9,24 ----
   * @author <a href="mailto:[EMAIL PROTECTED]">Mathias Bogaert</a>
   */
! public class PluginTest extends TestCase {
      private Plugin plugin = null;
  
!     public PluginTest(String s) {
          super(s);
      }
  
!     protected void setUp() throws Exception {
          plugin = new Plugin();
      }
  
!     public void testDummy() {
!     }
  }

Index: PropertyTest.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/test/java/xdoclet/PropertyTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** PropertyTest.java   5 Mar 2003 10:02:28 -0000       1.2
--- PropertyTest.java   7 Mar 2003 08:50:46 -0000       1.3
***************
*** 9,21 ****
   * @version $Revision$
   */
! public class PropertyTest extends TestCase
! {
!     public PropertyTest(String s)
!     {
          super(s);
      }
  
!     public void testProperty()
!     {
          Property property = new Property();
          property.setName("name");
--- 9,18 ----
   * @version $Revision$
   */
! public class PropertyTest extends TestCase {
!     public PropertyTest(String s) {
          super(s);
      }
  
!     public void testProperty() {
          Property property = new Property();
          property.setName("name");

Index: XDocletTest.java
===================================================================
RCS file: /cvsroot/xdoclet/xdoclet2/src/test/java/xdoclet/XDocletTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** XDocletTest.java    5 Mar 2003 10:02:28 -0000       1.2
--- XDocletTest.java    7 Mar 2003 08:50:46 -0000       1.3
***************
*** 9,23 ****
   * @version $Revision$
   */
! public class XDocletTest extends TestCase
! {
      XDoclet xdoclet;
  
!     public XDocletTest(String s)
!     {
          super(s);
      }
  
!     protected void setUp() throws Exception
!     {
          super.setUp();
  
--- 9,20 ----
   * @version $Revision$
   */
! public class XDocletTest extends TestCase {
      XDoclet xdoclet;
  
!     public XDocletTest(String s) {
          super(s);
      }
  
!     protected void setUp() throws Exception {
          super.setUp();
  



-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
for complex code. Debugging C/C++ programs can leave you feeling lost and 
disoriented. TotalView can help you find your way. Available on major UNIX 
and Linux platforms. Try it free. www.etnus.com
_______________________________________________
xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to