bloritsch 2003/07/10 13:31:50
Modified: meta/api/src/test/org/apache/avalon/meta/info/test
AbstractDescriptorTestCase.java
Log:
Format and optimize imports
Revision Changes Path
1.3 +11 -11
avalon-sandbox/meta/api/src/test/org/apache/avalon/meta/info/test/AbstractDescriptorTestCase.java
Index: AbstractDescriptorTestCase.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/meta/api/src/test/org/apache/avalon/meta/info/test/AbstractDescriptorTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractDescriptorTestCase.java 10 Jul 2003 20:30:51 -0000 1.2
+++ AbstractDescriptorTestCase.java 10 Jul 2003 20:31:50 -0000 1.3
@@ -52,8 +52,8 @@
import junit.framework.TestCase;
import org.apache.avalon.meta.info.Descriptor;
-import java.util.Properties;
import java.io.*;
+import java.util.Properties;
/**
* AbstractDescriptorTestCase does XYZ
@@ -76,17 +76,17 @@
protected Properties getProperties()
{
Properties props = new Properties();
- props.put(VALID_KEY, VALID_VALUE);
+ props.put( VALID_KEY, VALID_VALUE );
return props;
}
protected abstract Descriptor getDescriptor();
- protected void checkDescriptor(Descriptor desc )
+ protected void checkDescriptor( Descriptor desc )
{
- assertEquals( VALID_VALUE, desc.getAttribute(VALID_KEY) );
- assertEquals( DEFAULT_VALUE, desc.getAttribute(INVALID_KEY, DEFAULT_VALUE )
);
+ assertEquals( VALID_VALUE, desc.getAttribute( VALID_KEY ) );
+ assertEquals( DEFAULT_VALUE, desc.getAttribute( INVALID_KEY, DEFAULT_VALUE
) );
boolean hasValid = false;
boolean hasInvalid = false;
@@ -95,14 +95,14 @@
assertNotNull( names );
assertTrue( names.length > 0 );
- for (int i = 0; i < names.length; i++ )
+ for ( int i = 0; i < names.length; i++ )
{
- if ( VALID_KEY.equals(names[i]) ) hasValid = true;
- if ( INVALID_KEY.equals(names[i]) ) hasInvalid = true;
+ if ( VALID_KEY.equals( names[i] ) ) hasValid = true;
+ if ( INVALID_KEY.equals( names[i] ) ) hasInvalid = true;
}
assertTrue( hasValid );
- assertTrue( ! hasInvalid );
+ assertTrue( !hasInvalid );
}
public void testSerialization() throws IOException, ClassNotFoundException
@@ -110,13 +110,13 @@
Descriptor desc = getDescriptor();
checkDescriptor( desc );
- File file = new File("test.file");
+ File file = new File( "test.file" );
ObjectOutputStream oos = new ObjectOutputStream( new FileOutputStream( file
) );
oos.writeObject( desc );
oos.close();
ObjectInputStream ois = new ObjectInputStream( new FileInputStream( file )
);
- Descriptor serialized = (Descriptor)ois.readObject();
+ Descriptor serialized = (Descriptor) ois.readObject();
ois.close();
file.delete();
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]