avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test InitializationExceptionTestCase.java MetaInfoEntryTestCase.java RoleEntryTestCase.java
Date Mon, 21 Apr 2003 20:30:05 GMT
bloritsch    2003/04/21 13:30:05

  Modified:    fortress/src/test/org/apache/avalon/fortress/impl/extensions/test
                        InstrumentableCreatorTestCase.java
               fortress/src/test/org/apache/avalon/fortress/impl/lookup/test
                        FortressServiceManagerTestCase.java
               fortress/src/test/org/apache/avalon/fortress/impl/role/test
                        AbstractMetaInfoManagerTestCase.java
                        Role2MetaInfoManagerTestCase.java
                        ServiceMetaManagerTestCase.java
               fortress/src/test/org/apache/avalon/fortress/impl/test
                        ComponentHandlerEntryTestCase.java
                        ComponentHandlerMetaDataTestCase.java
               fortress/src/test/org/apache/avalon/fortress/test
                        InitializationExceptionTestCase.java
                        MetaInfoEntryTestCase.java RoleEntryTestCase.java
  Log:
  formatting code
  
  Revision  Changes    Path
  1.3       +13 -13    avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/extensions/test/InstrumentableCreatorTestCase.java
  
  Index: InstrumentableCreatorTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/extensions/test/InstrumentableCreatorTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InstrumentableCreatorTestCase.java	21 Apr 2003 20:29:42 -0000	1.2
  +++ InstrumentableCreatorTestCase.java	21 Apr 2003 20:30:04 -0000	1.3
  @@ -81,15 +81,15 @@
           m_instrumentable = new TestInstrumentable();
           m_instrumentManager = new TestInstrumentManager();
           m_context = new DefaultContext();
  -        m_context.put("component.name", "component1");
  +        m_context.put( "component.name", "component1" );
           m_context.makeReadOnly();
       }
   
       public void testNoInstrumentManager() throws Exception
       {
  -        Creator creator = new InstrumentableCreator(null);
  +        Creator creator = new InstrumentableCreator( null );
   
  -        creator.create(m_instrumentable, m_context);
  +        creator.create( m_instrumentable, m_context );
           creator.destroy( m_instrumentable, m_context );
       }
   
  @@ -107,14 +107,14 @@
           public void registerInstrumentable( Instrumentable instrumentable, String instrumentableName
) throws Exception
           {
               String name = instrumentable.getInstrumentableName();
  -            assertNotNull(name);
  +            assertNotNull( name );
   
               name = "registered:" + instrumentableName;
  -            instrumentable.setInstrumentableName(name);
  -            assertEquals(name, instrumentable.getInstrumentableName());
  +            instrumentable.setInstrumentableName( name );
  +            assertEquals( name, instrumentable.getInstrumentableName() );
   
  -            assertNotNull(instrumentable.getChildInstrumentables());
  -            assertNotNull(instrumentable.getInstruments());
  +            assertNotNull( instrumentable.getChildInstrumentables() );
  +            assertNotNull( instrumentable.getInstruments() );
           }
       }
   
  @@ -127,7 +127,7 @@
           public void setInstrumentableName( String name )
           {
               assertTrue( m_isActive );
  -            assertNotNull(name);
  +            assertNotNull( name );
               m_name = name;
               m_assigned = m_name;
           }
  @@ -135,15 +135,15 @@
           public String getInstrumentableName()
           {
               assertTrue( m_isActive );
  -            assertNotNull(m_name);
  +            assertNotNull( m_name );
   
               if ( null == m_assigned )
               {
  -                assertEquals(DEFAULT_NAME, m_name);
  +                assertEquals( DEFAULT_NAME, m_name );
               }
               else
               {
  -                assertEquals(m_assigned, m_name);
  +                assertEquals( m_assigned, m_name );
               }
   
               return m_name;
  @@ -151,7 +151,7 @@
   
           public Instrument[] getInstruments()
           {
  -            assertTrue(m_isActive);
  +            assertTrue( m_isActive );
               return new Instrument[0];
           }
   
  
  
  
  1.5       +1 -1      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/lookup/test/FortressServiceManagerTestCase.java
  
  Index: FortressServiceManagerTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/lookup/test/FortressServiceManagerTestCase.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FortressServiceManagerTestCase.java	21 Apr 2003 20:25:52 -0000	1.4
  +++ FortressServiceManagerTestCase.java	21 Apr 2003 20:30:04 -0000	1.5
  @@ -138,7 +138,7 @@
       {
           if ( exists( key, hint ) )
           {
  -            if (hint.equals(AbstractContainer.SELECTOR_ENTRY))
  +            if ( hint.equals( AbstractContainer.SELECTOR_ENTRY ) )
               {
                   return m_selector;
               }
  
  
  
  1.3       +2 -2      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/role/test/AbstractMetaInfoManagerTestCase.java
  
  Index: AbstractMetaInfoManagerTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/role/test/AbstractMetaInfoManagerTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- AbstractMetaInfoManagerTestCase.java	21 Apr 2003 20:29:42 -0000	1.2
  +++ AbstractMetaInfoManagerTestCase.java	21 Apr 2003 20:30:04 -0000	1.3
  @@ -90,13 +90,13 @@
                                 final String handlerClassname )
           throws ClassNotFoundException
       {
  -        final MetaInfoEntry metaEntry = m_manager.getMetaInfoForShortName(shortname);
  +        final MetaInfoEntry metaEntry = m_manager.getMetaInfoForShortName( shortname );
           assertNotNull( "MetaInfoEntry", metaEntry );
   
           assertEquals( "componentClass:",
               metaEntry.getComponentClass(), Class.forName( className ) );
   
  -        for (int i = 0; i < roles.length; i++)
  +        for ( int i = 0; i < roles.length; i++ )
           {
               assertTrue( "Role:", metaEntry.containsRole( roles[i] ) );
           }
  
  
  
  1.3       +2 -2      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/role/test/Role2MetaInfoManagerTestCase.java
  
  Index: Role2MetaInfoManagerTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/role/test/Role2MetaInfoManagerTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Role2MetaInfoManagerTestCase.java	21 Apr 2003 20:29:42 -0000	1.2
  +++ Role2MetaInfoManagerTestCase.java	21 Apr 2003 20:30:04 -0000	1.3
  @@ -71,12 +71,12 @@
           FortressRoleManager roles = new FortressRoleManager( null, this.getClass().getClassLoader()
);
           roles.enableLogging( new ConsoleLogger( ConsoleLogger.LEVEL_INFO ) );
           roles.initialize();
  -        m_manager = new Role2MetaInfoManager(roles);
  +        m_manager = new Role2MetaInfoManager( roles );
       }
   
       public void testRole2MetaInfoManager() throws Exception
       {
  -        String[] roles = new String[] {"org.apache.avalon.excalibur.datasource.DataSourceComponent"};
  +        String[] roles = new String[]{"org.apache.avalon.excalibur.datasource.DataSourceComponent"};
   
           checkRole( "jdbc-datasource", roles,
               "org.apache.avalon.excalibur.datasource.JdbcDataSource",
  
  
  
  1.3       +7 -7      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/role/test/ServiceMetaManagerTestCase.java
  
  Index: ServiceMetaManagerTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/role/test/ServiceMetaManagerTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServiceMetaManagerTestCase.java	21 Apr 2003 20:29:42 -0000	1.2
  +++ ServiceMetaManagerTestCase.java	21 Apr 2003 20:30:04 -0000	1.3
  @@ -74,20 +74,20 @@
       public void setUp() throws Exception
       {
           m_manager = new ServiceMetaManager();
  -        ContainerUtil.enableLogging(m_manager, new NullLogger());
  -        ContainerUtil.initialize(m_manager);
  +        ContainerUtil.enableLogging( m_manager, new NullLogger() );
  +        ContainerUtil.initialize( m_manager );
       }
   
       public void testTestRoles() throws Exception
       {
  -        String[] roles = new String[] {Role1.class.getName()};
  -        checkRole("component1", roles, Component1.class.getName(), ThreadSafeComponentHandler.class.getName());
  +        String[] roles = new String[]{Role1.class.getName()};
  +        checkRole( "component1", roles, Component1.class.getName(), ThreadSafeComponentHandler.class.getName()
);
   
           roles[0] = Role2.class.getName();
  -        checkRole("component2", roles, Component2.class.getName(), PoolableComponentHandler.class.getName());
  +        checkRole( "component2", roles, Component2.class.getName(), PoolableComponentHandler.class.getName()
);
   
           roles[0] = Role4.class.getName();
  -        checkRole("component4", roles, Component4.class.getName(), FactoryComponentHandler.class.getName());
  +        checkRole( "component4", roles, Component4.class.getName(), FactoryComponentHandler.class.getName()
);
   
           roles = new String[]
           {
  @@ -95,6 +95,6 @@
               BaseRole.class.getName()
           };
   
  -        checkRole("component3", roles, Component3.class.getName(), PerThreadComponentHandler.class.getName());
  +        checkRole( "component3", roles, Component3.class.getName(), PerThreadComponentHandler.class.getName()
);
       }
   }
  
  
  
  1.2       +4 -4      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/test/ComponentHandlerEntryTestCase.java
  
  Index: ComponentHandlerEntryTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/test/ComponentHandlerEntryTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ComponentHandlerEntryTestCase.java	21 Apr 2003 20:25:52 -0000	1.1
  +++ ComponentHandlerEntryTestCase.java	21 Apr 2003 20:30:05 -0000	1.2
  @@ -98,15 +98,15 @@
           try
           {
               new ComponentHandlerEntry( null, meta );
  -            fail("No NullPointerException was thrown");
  +            fail( "No NullPointerException was thrown" );
           }
  -        catch (NullPointerException npe)
  +        catch ( NullPointerException npe )
           {
               // SUCCESS!!
           }
  -        catch (Exception e)
  +        catch ( Exception e )
           {
  -            fail("Incorrect exception thrown: " + e.getClass().getName());
  +            fail( "Incorrect exception thrown: " + e.getClass().getName() );
           }
   
           try
  
  
  
  1.2       +16 -16    avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/test/ComponentHandlerMetaDataTestCase.java
  
  Index: ComponentHandlerMetaDataTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/impl/test/ComponentHandlerMetaDataTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ComponentHandlerMetaDataTestCase.java	21 Apr 2003 20:08:10 -0000	1.1
  +++ ComponentHandlerMetaDataTestCase.java	21 Apr 2003 20:30:05 -0000	1.2
  @@ -69,35 +69,35 @@
   
       public void testMetaData()
       {
  -        ComponentHandlerMetaData meta = new ComponentHandlerMetaData("component1",
  -            Component1.class.getName(), new DefaultConfiguration("test"), true);
  +        ComponentHandlerMetaData meta = new ComponentHandlerMetaData( "component1",
  +            Component1.class.getName(), new DefaultConfiguration( "test" ), true );
   
  -        assertNotNull(meta);
  -        assertNotNull(meta.getClassname());
  -        assertNotNull(meta.getConfiguration());
  -        assertNotNull(meta.getName());
  -        assertEquals(true, meta.isLazyActivation());
  -        assertEquals("component1", meta.getName());
  -        assertEquals(Component1.class.getName(), meta.getClassname());
  -        assertEquals("test", meta.getConfiguration().getName());
  +        assertNotNull( meta );
  +        assertNotNull( meta.getClassname() );
  +        assertNotNull( meta.getConfiguration() );
  +        assertNotNull( meta.getName() );
  +        assertEquals( true, meta.isLazyActivation() );
  +        assertEquals( "component1", meta.getName() );
  +        assertEquals( Component1.class.getName(), meta.getClassname() );
  +        assertEquals( "test", meta.getConfiguration().getName() );
       }
   
       public void testNullPointerException()
       {
           try
           {
  -            new ComponentHandlerMetaData(null, Component1.class.getName(),
  -                new DefaultConfiguration("test"), false);
  +            new ComponentHandlerMetaData( null, Component1.class.getName(),
  +                new DefaultConfiguration( "test" ), false );
   
  -            fail("No NullPointerException was thrown");
  +            fail( "No NullPointerException was thrown" );
           }
  -        catch(NullPointerException npe)
  +        catch ( NullPointerException npe )
           {
               // SUCCESS!!
           }
  -        catch(Exception e)
  +        catch ( Exception e )
           {
  -            fail("Did not throw the correct exception: " + e.getClass().getName());
  +            fail( "Did not throw the correct exception: " + e.getClass().getName() );
           }
   
           try
  
  
  
  1.2       +9 -9      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/InitializationExceptionTestCase.java
  
  Index: InitializationExceptionTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/InitializationExceptionTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InitializationExceptionTestCase.java	21 Apr 2003 15:15:39 -0000	1.1
  +++ InitializationExceptionTestCase.java	21 Apr 2003 20:30:05 -0000	1.2
  @@ -67,20 +67,20 @@
   
       public void testRegularCreation()
       {
  -        InitializationException exc = new InitializationException("Message");
  -        assertNotNull(exc);
  -        assertNotNull(exc.getMessage());
  -        assertNotNull(exc.getLocalizedMessage());
  -        assertEquals("Message", exc.getMessage());
  +        InitializationException exc = new InitializationException( "Message" );
  +        assertNotNull( exc );
  +        assertNotNull( exc.getMessage() );
  +        assertNotNull( exc.getLocalizedMessage() );
  +        assertEquals( "Message", exc.getMessage() );
           assertTrue( null == exc.getCause() );
       }
   
       public void testNestedCreation()
       {
           Exception nest = new RuntimeException();
  -        InitializationException exc = new InitializationException("Message", nest);
  -        assertNotNull(exc);
  -        assertNotNull(exc.getCause());
  +        InitializationException exc = new InitializationException( "Message", nest );
  +        assertNotNull( exc );
  +        assertNotNull( exc.getCause() );
           assertNotNull( exc.getMessage() );
           assertNotNull( exc.getLocalizedMessage() );
           assertEquals( "Message", exc.getMessage() );
  
  
  
  1.4       +5 -5      avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/MetaInfoEntryTestCase.java
  
  Index: MetaInfoEntryTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/MetaInfoEntryTestCase.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MetaInfoEntryTestCase.java	21 Apr 2003 20:29:43 -0000	1.3
  +++ MetaInfoEntryTestCase.java	21 Apr 2003 20:30:05 -0000	1.4
  @@ -142,16 +142,16 @@
       {
           try
           {
  -            new MetaInfoEntry(null);
  -            fail("Did not throw an exception");
  +            new MetaInfoEntry( null );
  +            fail( "Did not throw an exception" );
           }
  -        catch(NullPointerException npe)
  +        catch ( NullPointerException npe )
           {
               // SUCCESS!
           }
  -        catch(Exception e)
  +        catch ( Exception e )
           {
  -            fail("Threw wrong exception type: " + e.getClass().getName() );
  +            fail( "Threw wrong exception type: " + e.getClass().getName() );
           }
   
           try
  
  
  
  1.3       +16 -16    avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/RoleEntryTestCase.java
  
  Index: RoleEntryTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-excalibur/fortress/src/test/org/apache/avalon/fortress/test/RoleEntryTestCase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- RoleEntryTestCase.java	21 Apr 2003 20:29:44 -0000	1.2
  +++ RoleEntryTestCase.java	21 Apr 2003 20:30:05 -0000	1.3
  @@ -63,9 +63,9 @@
    */
   public class RoleEntryTestCase extends TestCase
   {
  -    public RoleEntryTestCase(String name)
  +    public RoleEntryTestCase( String name )
       {
  -        super(name);
  +        super( name );
       }
   
       public void testRoleEntry()
  @@ -77,16 +77,16 @@
   
           RoleEntry entry = new RoleEntry( role, name, componentClass, handlerClass );
   
  -        assertNotNull(entry);
  -        assertNotNull(entry.getRole());
  -        assertNotNull(entry.getShortname());
  -        assertNotNull(entry.getComponentClass());
  -        assertNotNull(entry.getHandlerClass());
  -
  -        assertEquals(role, entry.getRole());
  -        assertEquals(name, entry.getShortname());
  -        assertEquals(componentClass, entry.getComponentClass());
  -        assertEquals(handlerClass, entry.getHandlerClass());
  +        assertNotNull( entry );
  +        assertNotNull( entry.getRole() );
  +        assertNotNull( entry.getShortname() );
  +        assertNotNull( entry.getComponentClass() );
  +        assertNotNull( entry.getHandlerClass() );
  +
  +        assertEquals( role, entry.getRole() );
  +        assertEquals( name, entry.getShortname() );
  +        assertEquals( componentClass, entry.getComponentClass() );
  +        assertEquals( handlerClass, entry.getHandlerClass() );
       }
   
       public void testNullPointerExceptions()
  @@ -99,15 +99,15 @@
           try
           {
               new RoleEntry( null, name, componentClass, handlerClass );
  -            fail("Did not throw an exception");
  +            fail( "Did not throw an exception" );
           }
  -        catch( NullPointerException npe )
  +        catch ( NullPointerException npe )
           {
               // SUCCESS!
           }
  -        catch( Exception e )
  +        catch ( Exception e )
           {
  -            fail("threw the wrong exception: " + e.getClass().getName() );
  +            fail( "threw the wrong exception: " + e.getClass().getName() );
           }
   
           try
  
  
  

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


Mime
View raw message