geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject cvs commit: incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/config ConfigurationTest.java StringValueParserTest.java
Date Sun, 24 Aug 2003 17:12:38 GMT
jdillon     2003/08/24 10:12:38

  Modified:    modules/twiddle/src/test/org/apache/geronimo/twiddle/command
                        CommandFactoryTest.java CommandPathParserTest.java
               modules/twiddle/src/test/org/apache/geronimo/twiddle/config
                        ConfigurationTest.java StringValueParserTest.java
  Log:
   o Removed suite methods & constructors as they do not appear to be needed
  
  Revision  Changes    Path
  1.6       +6 -27     incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/command/CommandFactoryTest.java
  
  Index: CommandFactoryTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/command/CommandFactoryTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- CommandFactoryTest.java	16 Aug 2003 15:14:13 -0000	1.5
  +++ CommandFactoryTest.java	24 Aug 2003 17:12:38 -0000	1.6
  @@ -56,10 +56,7 @@
   
   package org.apache.geronimo.twiddle.command;
   
  -import junit.framework.Test;
   import junit.framework.TestCase;
  -import junit.framework.TestSuite;
  -import junit.framework.Assert;
   
   import org.apache.geronimo.twiddle.config.CommandConfig;
   import org.apache.geronimo.twiddle.config.Attribute;
  @@ -73,24 +70,6 @@
       extends TestCase
   {
       /**
  -     * Return the tests included in this test suite.
  -     */
  -    public static Test suite()
  -    {
  -        return new TestSuite(CommandFactoryTest.class);
  -    }
  -    
  -    /**
  -     * Construct a new instance of this test case.
  -     *
  -     * @param name  Name of the test case
  -     */
  -    public CommandFactoryTest(final String name)
  -    {
  -        super(name);
  -    }
  -    
  -    /**
        * Set up instance variables required by this test case.
        */
       protected void setUp()
  @@ -124,12 +103,12 @@
           
           // Verify command info
           CommandInfo info = command.getCommandInfo();
  -        Assert.assertNotNull(command.getCommandInfo());
  -        Assert.assertEquals(name, info.getName());
  -        Assert.assertEquals(desc, info.getDescription());
  +        assertNotNull(command.getCommandInfo());
  +        assertEquals(name, info.getName());
  +        assertEquals(desc, info.getDescription());
           
           // Verify the class type
  -        Assert.assertEquals(type, command.getClass().getName());
  +        assertEquals(type, command.getClass().getName());
           
           command.execute(new String[0]);
       }
  @@ -150,7 +129,7 @@
           Command command = protoInfo.getPrototype();
           
           // Verify that the text attribute was set correctly
  -        Assert.assertEquals(text, ((TestCommand)command).getText());
  +        assertEquals(text, ((TestCommand)command).getText());
           
           command.execute(new String[0]);
       }
  
  
  
  1.5       +35 -56    incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/command/CommandPathParserTest.java
  
  Index: CommandPathParserTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/command/CommandPathParserTest.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CommandPathParserTest.java	16 Aug 2003 15:14:13 -0000	1.4
  +++ CommandPathParserTest.java	24 Aug 2003 17:12:38 -0000	1.5
  @@ -56,10 +56,7 @@
   
   package org.apache.geronimo.twiddle.command;
   
  -import junit.framework.Test;
   import junit.framework.TestCase;
  -import junit.framework.TestSuite;
  -import junit.framework.Assert;
   
   /**
    * Tests for <code>CommandPathParser</code>.
  @@ -70,24 +67,6 @@
       extends TestCase
   {
       /**
  -     * Return the tests included in this test suite.
  -     */
  -    public static Test suite()
  -    {
  -        return new TestSuite(CommandPathParserTest.class);
  -    }
  -    
  -    /**
  -     * Construct a new instance of this test case.
  -     *
  -     * @param name  Name of the test case
  -     */
  -    public CommandPathParserTest(final String name)
  -    {
  -        super(name);
  -    }
  -    
  -    /**
        * Set up instance variables required by this test case.
        */
       protected void setUp()
  @@ -111,9 +90,9 @@
           CommandPathParser parser = new CommandPathParser("/");
           String[] elements = parser.elements();
           
  -        Assert.assertEquals(true, parser.isAbsolute());
  -        Assert.assertEquals(1, elements.length);
  -        Assert.assertEquals("/", elements[0]);
  +        assertEquals(true, parser.isAbsolute());
  +        assertEquals(1, elements.length);
  +        assertEquals("/", elements[0]);
       }
   
       public void testTrailing()
  @@ -121,10 +100,10 @@
           CommandPathParser parser = new CommandPathParser("/one/");
           String[] elements = parser.elements();
           
  -        Assert.assertEquals(true, parser.isAbsolute());
  -        Assert.assertEquals(2, elements.length);
  -        Assert.assertEquals("/", elements[0]);
  -        Assert.assertEquals("one", elements[1]);
  +        assertEquals(true, parser.isAbsolute());
  +        assertEquals(2, elements.length);
  +        assertEquals("/", elements[0]);
  +        assertEquals("one", elements[1]);
       }
       
       public void testAbsolute2()
  @@ -132,10 +111,10 @@
           CommandPathParser parser = new CommandPathParser("/one");
           String[] elements = parser.elements();
           
  -        Assert.assertEquals(true, parser.isAbsolute());
  -        Assert.assertEquals(2, elements.length);
  -        Assert.assertEquals("/", elements[0]);
  -        Assert.assertEquals("one", elements[1]);
  +        assertEquals(true, parser.isAbsolute());
  +        assertEquals(2, elements.length);
  +        assertEquals("/", elements[0]);
  +        assertEquals("one", elements[1]);
       }
   
       public void testAbsolute3()
  @@ -143,11 +122,11 @@
           CommandPathParser parser = new CommandPathParser("/one/two");
           String[] elements = parser.elements();
           
  -        Assert.assertEquals(true, parser.isAbsolute());
  -        Assert.assertEquals(3, elements.length);
  -        Assert.assertEquals("/", elements[0]);
  -        Assert.assertEquals("one", elements[1]);
  -        Assert.assertEquals("two", elements[2]);
  +        assertEquals(true, parser.isAbsolute());
  +        assertEquals(3, elements.length);
  +        assertEquals("/", elements[0]);
  +        assertEquals("one", elements[1]);
  +        assertEquals("two", elements[2]);
       }
   
       public void testAbsolute4()
  @@ -155,12 +134,12 @@
           CommandPathParser parser = new CommandPathParser("/one/two/three");
           String[] elements = parser.elements();
           
  -        Assert.assertEquals(true, parser.isAbsolute());
  -        Assert.assertEquals(4, elements.length);
  -        Assert.assertEquals("/", elements[0]);
  -        Assert.assertEquals("one", elements[1]);
  -        Assert.assertEquals("two", elements[2]);
  -        Assert.assertEquals("three", elements[3]);
  +        assertEquals(true, parser.isAbsolute());
  +        assertEquals(4, elements.length);
  +        assertEquals("/", elements[0]);
  +        assertEquals("one", elements[1]);
  +        assertEquals("two", elements[2]);
  +        assertEquals("three", elements[3]);
       }
       
       public void testRelative1()
  @@ -168,9 +147,9 @@
           CommandPathParser parser = new CommandPathParser("one");
           String[] elements = parser.elements();
           
  -        Assert.assertEquals(false, parser.isAbsolute());
  -        Assert.assertEquals(1, elements.length);
  -        Assert.assertEquals("one", elements[0]);
  +        assertEquals(false, parser.isAbsolute());
  +        assertEquals(1, elements.length);
  +        assertEquals("one", elements[0]);
       }
   
       public void testRelative2()
  @@ -178,10 +157,10 @@
           CommandPathParser parser = new CommandPathParser("one/two");
           String[] elements = parser.elements();
           
  -        Assert.assertEquals(false, parser.isAbsolute());
  -        Assert.assertEquals(2, elements.length);
  -        Assert.assertEquals("one", elements[0]);
  -        Assert.assertEquals("two", elements[1]);
  +        assertEquals(false, parser.isAbsolute());
  +        assertEquals(2, elements.length);
  +        assertEquals("one", elements[0]);
  +        assertEquals("two", elements[1]);
       }
   
       public void testRelative3()
  @@ -189,11 +168,11 @@
           CommandPathParser parser = new CommandPathParser("one/two/three");
           String[] elements = parser.elements();
           
  -        Assert.assertEquals(false, parser.isAbsolute());
  -        Assert.assertEquals(3, elements.length);
  -        Assert.assertEquals("one", elements[0]);
  -        Assert.assertEquals("two", elements[1]);
  -        Assert.assertEquals("three", elements[2]);
  +        assertEquals(false, parser.isAbsolute());
  +        assertEquals(3, elements.length);
  +        assertEquals("one", elements[0]);
  +        assertEquals("two", elements[1]);
  +        assertEquals("three", elements[2]);
       }
   }
   
  
  
  
  1.8       +20 -41    incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/config/ConfigurationTest.java
  
  Index: ConfigurationTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/config/ConfigurationTest.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ConfigurationTest.java	16 Aug 2003 15:14:13 -0000	1.7
  +++ ConfigurationTest.java	24 Aug 2003 17:12:38 -0000	1.8
  @@ -63,10 +63,7 @@
   import java.io.InputStreamReader;
   import java.io.BufferedReader;
   
  -import junit.framework.Test;
   import junit.framework.TestCase;
  -import junit.framework.TestSuite;
  -import junit.framework.Assert;
   
   /**
    * Tests for <code>Configuration</code>.
  @@ -76,24 +73,6 @@
   public class ConfigurationTest
       extends TestCase
   {
  -    /**
  -     * Return the tests included in this test suite.
  -     */
  -    public static Test suite()
  -    {
  -        return new TestSuite(ConfigurationTest.class);
  -    }
  -    
  -    /**
  -     * Construct a new instance of this test case.
  -     *
  -     * @param name  Name of the test case
  -     */
  -    public ConfigurationTest(final String name)
  -    {
  -        super(name);
  -    }
  -    
       protected ConfigurationReader reader;
       
       /**
  @@ -153,15 +132,15 @@
           Configuration config = read("test1.xml");
           
           PropertiesConfig p = config.getPropertiesConfig();
  -        Assert.assertNotNull(p);
  +        assertNotNull(p);
           
           PropertyConfig[] props = p.getPropertyConfig();
  -        Assert.assertEquals(2, props.length);
  +        assertEquals(2, props.length);
           
  -        Assert.assertEquals("property1", props[0].getName());
  -        Assert.assertEquals("value1", props[0].getContent());
  -        Assert.assertEquals("property2", props[1].getName());
  -        Assert.assertEquals("value2", props[1].getContent());
  +        assertEquals("property1", props[0].getName());
  +        assertEquals("value1", props[0].getContent());
  +        assertEquals("property2", props[1].getName());
  +        assertEquals("value2", props[1].getContent());
       }
       
       /*
  @@ -171,13 +150,13 @@
           Configuration config = read("test1.xml");
           
           LibrariesConfig l = config.getLibrariesConfig();
  -        Assert.assertNotNull(l);
  +        assertNotNull(l);
           
           LibraryConfig[] libs = l.getLibraryConfig();
  -        Assert.assertEquals(2, libs.length);
  +        assertEquals(2, libs.length);
           
  -        Assert.assertEquals("library1", libs[0].getContent());
  -        Assert.assertEquals("library2", libs[1].getContent());
  +        assertEquals("library1", libs[0].getContent());
  +        assertEquals("library2", libs[1].getContent());
       }
       
       */
  @@ -187,13 +166,13 @@
           Configuration config = read("test1.xml");
           
           IncludesConfig i = config.getIncludesConfig();
  -        Assert.assertNotNull(i);
  +        assertNotNull(i);
           
           String[] incs = i.getInclude();
  -        Assert.assertEquals(2, incs.length);
  +        assertEquals(2, incs.length);
           
  -        Assert.assertEquals("include1", incs[0]);
  -        Assert.assertEquals("include2", incs[1]);
  +        assertEquals("include1", incs[0]);
  +        assertEquals("include2", incs[1]);
       }
       
       /*
  @@ -203,14 +182,14 @@
           Configuration config = read("test1.xml");
           
           SearchPathConfig s = config.getSearchPathConfig();
  -        Assert.assertNotNull(s);
  +        assertNotNull(s);
           
           String[] paths = s.getPathElement();
  -        Assert.assertEquals(3, paths.length);
  +        assertEquals(3, paths.length);
           
  -        Assert.assertEquals("path1", paths[0]);
  -        Assert.assertEquals("path2", paths[1]);
  -        Assert.assertEquals("path3", paths[2]);
  +        assertEquals("path1", paths[0]);
  +        assertEquals("path2", paths[1]);
  +        assertEquals("path3", paths[2]);
       }
       
       */
  
  
  
  1.2       +1 -22     incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/config/StringValueParserTest.java
  
  Index: StringValueParserTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/twiddle/src/test/org/apache/geronimo/twiddle/config/StringValueParserTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StringValueParserTest.java	24 Aug 2003 16:15:22 -0000	1.1
  +++ StringValueParserTest.java	24 Aug 2003 17:12:38 -0000	1.2
  @@ -56,10 +56,7 @@
   
   package org.apache.geronimo.twiddle.config;
   
  -import junit.framework.Test;
   import junit.framework.TestCase;
  -import junit.framework.TestSuite;
  -import junit.framework.Assert;
   
   /**
    * Tests for <code>Configuration</code>.
  @@ -69,24 +66,6 @@
   public class StringValueParserTest
       extends TestCase
   {
  -    /**
  -     * Return the tests included in this test suite.
  -     */
  -    public static Test suite()
  -    {
  -        return new TestSuite(StringValueParserTest.class);
  -    }
  -    
  -    /**
  -     * Construct a new instance of this test case.
  -     *
  -     * @param name  Name of the test case
  -     */
  -    public StringValueParserTest(final String name)
  -    {
  -        super(name);
  -    }
  -    
       protected StringValueParser parser;
       
       /**
  
  
  

Mime
View raw message