avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/test/data Component3.java
Date Tue, 01 Oct 2002 06:16:25 GMT
donaldp     2002/09/30 23:16:25

  Modified:    src/test/org/apache/avalon/phoenix/test/data Component3.java
  Log:
  Update test data to actually check for expected services
  
  Revision  Changes    Path
  1.3       +12 -2     jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/test/data/Component3.java
  
  Index: Component3.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-phoenix/src/test/org/apache/avalon/phoenix/test/data/Component3.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Component3.java	1 Oct 2002 03:15:19 -0000	1.2
  +++ Component3.java	1 Oct 2002 06:16:25 -0000	1.3
  @@ -10,6 +10,7 @@
   import org.apache.avalon.framework.service.Serviceable;
   import org.apache.avalon.framework.service.ServiceManager;
   import org.apache.avalon.framework.service.ServiceException;
  +import java.util.Arrays;
   
   /**
    * A test component.
  @@ -23,6 +24,15 @@
       public void service( final ServiceManager manager )
           throws ServiceException
       {
  -        manager.lookup( Service2[].class.getName() );
  +        final Service2[] services =
  +            (Service2[]) manager.lookup( Service2[].class.getName() );
  +        System.out.println( "Passed the following services: " +
  +                            Arrays.asList( services ) );
  +        if( 3 != services.length )
  +        {
  +            final String message =
  +                "Expected to get 3 services but got " + services.length;
  +            throw new ServiceException( message );
  +        }
       }
   }
  
  
  

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


Mime
View raw message