avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon-sandbox/meta/api/src/test/org/apache/avalon/meta/info/test EntryDescriptorTestCase.java
Date Fri, 11 Jul 2003 13:25:10 GMT
bloritsch    2003/07/11 06:25:10

  Modified:    meta/api/src/test/org/apache/avalon/meta/info/test
                        EntryDescriptorTestCase.java
  Log:
  Update the EntryDescriptorTestCase
  
  Revision  Changes    Path
  1.2       +15 -10    avalon-sandbox/meta/api/src/test/org/apache/avalon/meta/info/test/EntryDescriptorTestCase.java
  
  Index: EntryDescriptorTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/meta/api/src/test/org/apache/avalon/meta/info/test/EntryDescriptorTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- EntryDescriptorTestCase.java	11 Jul 2003 13:02:27 -0000	1.1
  +++ EntryDescriptorTestCase.java	11 Jul 2003 13:25:10 -0000	1.2
  @@ -66,6 +66,7 @@
       private static final String m_alias = "otherVal";
       private static final String m_type = EntryDescriptor.class.getName();
       private static final boolean m_optional = true;
  +    private static final boolean m_volatile = true;
   
       public EntryDescriptorTestCase( String name )
       {
  @@ -74,14 +75,17 @@
   
       public void testEntryDescriptor()
       {
  -        EntryDescriptor entry = new EntryDescriptor(m_key, m_alias, m_type, m_optional);
  -        checkEntry(entry, m_key, m_alias, m_type, m_optional);
  +        EntryDescriptor entry = new EntryDescriptor(m_key, m_type, m_optional, m_volatile,
m_alias);
  +        checkEntry(entry, m_key, m_type, m_optional, m_volatile, m_alias );
   
           entry = new EntryDescriptor(m_key, m_type);
  -        checkEntry(entry, m_key, null, m_type, false);
  +        checkEntry(entry, m_key, m_type, false, false, null );
   
           entry = new EntryDescriptor(m_key, m_type, m_optional);
  -        checkEntry(entry, m_key, null, m_type, m_optional);
  +        checkEntry(entry, m_key, m_type, m_optional, false, null );
  +
  +        entry = new EntryDescriptor( m_key, m_type, m_optional, m_volatile );
  +        checkEntry( entry, m_key, m_type, m_optional, m_volatile, null );
   
           try
           {
  @@ -104,20 +108,21 @@
           }
       }
   
  -    private void checkEntry(EntryDescriptor desc, String key, String alias, String type,
boolean isOptional)
  +    private void checkEntry(EntryDescriptor desc, String key, String type, boolean isOptional,
boolean isVolatile, String alias)
       {
           assertNotNull( desc );
           assertEquals( key, desc.getKey() );
  -        assertEquals( alias, desc.getType() );
  -        assertEquals( type, desc.getAlias() );
  +        assertEquals( alias, desc.getAlias() );
  +        assertEquals( type, desc.getClassname() );
           assertEquals( isOptional, desc.isOptional() );
           assertEquals( ! isOptional, desc.isRequired() );
  +        assertEquals( isVolatile, desc.isVolatile() );
       }
   
       public void testSerialization() throws IOException, ClassNotFoundException
       {
  -        EntryDescriptor entry = new EntryDescriptor(m_key, m_alias, m_type, m_optional);
  -        checkEntry(entry, m_key, m_alias, m_type, m_optional);
  +        EntryDescriptor entry = new EntryDescriptor( m_key, m_type, m_optional, m_volatile,
m_alias );
  +        checkEntry(entry, m_key, m_type, m_optional, m_volatile, m_alias );
   
           File file = new File("test.out");
           ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(file));
  @@ -129,7 +134,7 @@
           ois.close();
           file.delete();
   
  -        checkEntry(serialized, m_key, m_alias, m_type, m_optional);
  +        checkEntry(serialized, m_key, m_type, m_optional, m_volatile, m_alias );
   
           assertEquals( entry, serialized );
           assertEquals( entry.hashCode(), serialized.hashCode() );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message