cvs commit: spice/sandbox/metaclass/src/test/org/realityforge/metaclass/model ModelTestCase.java

Peter Donald <[email protected]>
Newsgroups gmane.comp.java.spice.cvs
Message-ID <[email protected]>
donaldp     03/10/28 03:04:21

  Modified:    sandbox/metaclass/src/test/org/realityforge/metaclass/model
                        ModelTestCase.java
  Log:
  Remove attributes test case
  
  Revision  Changes    Path
  1.10      +1 -100    spice/sandbox/metaclass/src/test/org/realityforge/metaclass/model/ModelTestCase.java
  
  Index: ModelTestCase.java
  ===================================================================
  RCS file: /cvsroot/spice/spice/sandbox/metaclass/src/test/org/realityforge/metaclass/model/ModelTestCase.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ModelTestCase.java	28 Oct 2003 08:15:03 -0000	1.9
  +++ ModelTestCase.java	28 Oct 2003 11:04:21 -0000	1.10
  @@ -7,115 +7,16 @@
    */
   package org.realityforge.metaclass.model;
   
  -import java.util.Properties;
   import junit.framework.TestCase;
   
   /**
    *
    * @author <a href="mailto:peter at realityforge.org">Peter Donald</a>
  - * @version $Revision: 1.9 $ $Date: 2003/10/28 08:15:03 $
  + * @version $Revision: 1.10 $ $Date: 2003/10/28 11:04:21 $
    */
   public class ModelTestCase
       extends TestCase
   {
  -    public void testAttributeOnlyWithName()
  -    {
  -        final Attribute attribute = new Attribute( "dna.service" );
  -        assertEquals( "attribute.getName() == dna.service",
  -                      "dna.service", attribute.getName() );
  -        assertEquals( "attribute.getValue() == null",
  -                      null, attribute.getValue() );
  -        assertEquals( "attribute.getParameterCount() == 0",
  -                      0, attribute.getParameterCount() );
  -        assertEquals( "attribute.getParameterNames().length == 0",
  -                      0, attribute.getParameterNames().length );
  -        assertEquals( "attribute.getParameter('key') == null",
  -                      null, attribute.getParameter( "key" ) );
  -        assertEquals( "attribute.getParameter('dummy','foo') == foo",
  -                      "foo", attribute.getParameter( "key", "foo" ) );
  -    }
  -
  -    public void testAttributeWithNameAndValue()
  -    {
  -        final Attribute attribute = new Attribute( "dna.service", "blah" );
  -        assertEquals( "attribute.getName() == dna.service",
  -                      "dna.service", attribute.getName() );
  -        assertEquals( "attribute.getValue() == blah",
  -                      "blah", attribute.getValue() );
  -        assertEquals( "attribute.getParameterCount() == 0",
  -                      0, attribute.getParameterCount() );
  -        assertEquals( "attribute.getParameterNames().length == 0",
  -                      0, attribute.getParameterNames().length );
  -        assertEquals( "attribute.getParameter('key') == null",
  -                      null, attribute.getParameter( "key" ) );
  -        assertEquals( "attribute.getParameter('dummy','foo') == foo",
  -                      "foo", attribute.getParameter( "key", "foo" ) );
  -    }
  -
  -    public void testAttributeWithNameAndParameters()
  -    {
  -        final Properties parameters = new Properties();
  -        parameters.setProperty( "key", "value" );
  -        final Attribute attribute = new Attribute( "dna.service", parameters );
  -        assertEquals( "attribute.getName() == dna.service",
  -                      "dna.service", attribute.getName() );
  -        assertEquals( "attribute.getValue() == null",
  -                      null, attribute.getValue() );
  -        assertEquals( "attribute.getParameterCount() == 1",
  -                      1, attribute.getParameterCount() );
  -        assertEquals( "attribute.getParameterNames().length == 1",
  -                      1, attribute.getParameterNames().length );
  -        assertEquals( "attribute.getParameter('key') == value",
  -                      "value", attribute.getParameter( "key" ) );
  -        assertEquals( "attribute.getParameter('dummy','foo') == value",
  -                      "value", attribute.getParameter( "key", "foo" ) );
  -    }
  -
  -    public void testAttributeWithNullName()
  -    {
  -        try
  -        {
  -            new Attribute( null );
  -        }
  -        catch( final NullPointerException npe )
  -        {
  -            assertEquals( "npe for name", "name", npe.getMessage() );
  -        }
  -    }
  -
  -    public void testParameterWithNullName()
  -    {
  -        try
  -        {
  -            new ParameterDescriptor( null, "type" );
  -        }
  -        catch( final NullPointerException npe )
  -        {
  -            assertEquals( "npe for name", "name", npe.getMessage() );
  -        }
  -    }
  -
  -    public void testParameterWithNullType()
  -    {
  -        try
  -        {
  -            new ParameterDescriptor( "name", null );
  -        }
  -        catch( final NullPointerException npe )
  -        {
  -            assertEquals( "npe for type", "type", npe.getMessage() );
  -        }
  -    }
  -
  -    public void testParameter()
  -    {
  -        final ParameterDescriptor param = new ParameterDescriptor( "paramName", "paramType" );
  -        assertEquals( "param.getName() == paramName",
  -                      "paramName", param.getName() );
  -        assertEquals( "param.getType() == paramType",
  -                      "paramType", param.getType() );
  -    }
  -
       public void testFieldWithNullName()
       {
           try
  
  
  


-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.