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:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>