Return-Path: Delivered-To: apmail-jakarta-avalon-cvs-archive@apache.org Received: (qmail 71221 invoked from network); 7 Sep 2002 01:42:15 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 7 Sep 2002 01:42:15 -0000 Received: (qmail 11627 invoked by uid 97); 7 Sep 2002 01:42:56 -0000 Delivered-To: qmlist-jakarta-archive-avalon-cvs@jakarta.apache.org Received: (qmail 11611 invoked by uid 97); 7 Sep 2002 01:42:55 -0000 Mailing-List: contact avalon-cvs-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Avalon CVS List" Reply-To: "Avalon Developers List" Delivered-To: mailing list avalon-cvs@jakarta.apache.org Received: (qmail 11600 invoked by uid 97); 7 Sep 2002 01:42:55 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Date: 7 Sep 2002 01:42:10 -0000 Message-ID: <20020907014210.19569.qmail@icarus.apache.org> From: donaldp@apache.org To: jakarta-avalon-excalibur-cvs@apache.org Subject: cvs commit: jakarta-avalon-excalibur/loader/src/test/org/apache/excalibur/loader/test LoaderTestSuite.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N donaldp 2002/09/06 18:42:10 Modified: loader/src/test/org/apache/excalibur/loader/test LoaderTestSuite.java Added: loader/src/test/org/apache/excalibur/loader/builder/test ReaderTestCase.java config1.xml Log: Start actually adding some tests. Revision Changes Path 1.1 jakarta-avalon-excalibur/loader/src/test/org/apache/excalibur/loader/builder/test/ReaderTestCase.java Index: ReaderTestCase.java =================================================================== /* * Copyright (C) The Apache Software Foundation. All rights reserved. * * This software is published under the terms of the Apache Software License * version 1.1, a copy of which has been included with this distribution in * the LICENSE.txt file. */ package org.apache.excalibur.loader.builder.test; import java.io.InputStream; import junit.framework.TestCase; import org.apache.avalon.framework.configuration.Configuration; import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder; import org.apache.excalibur.loader.builder.ClassLoaderSetBuilder; import org.apache.excalibur.loader.metadata.ClassLoaderSetDef; /** * TestCase for {@link ClassLoaderSetBuilder}. * * @author Peter Donald */ public class ReaderTestCase extends TestCase { private static final String[] BASE_PREDEFINED = new String[]{"*system*"}; public ReaderTestCase( final String name ) { super( name ); } private ClassLoaderSetDef build( final InputStream stream, final String[] predefined ) throws Exception { try { final ClassLoaderSetBuilder builder = new ClassLoaderSetBuilder(); final Configuration config = load( stream ); return builder.build( config, predefined ); } catch( final Exception e ) { fail( "Error building ClassLoaderSet: " + e ); return null; } } private Configuration load( final InputStream stream ) throws Exception { final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); return builder.build( stream ); } private ClassLoaderSetDef build( final String resource ) throws Exception { final InputStream stream = getClass().getResourceAsStream( resource ); if( null == stream ) { fail( "Missing resource " + resource ); } return build( stream, BASE_PREDEFINED ); } public void testConfig1() throws Exception { final ClassLoaderSetDef defs = build( "config1.xml" ); } } 1.1 jakarta-avalon-excalibur/loader/src/test/org/apache/excalibur/loader/builder/test/config1.xml Index: config1.xml =================================================================== Avalon.Framework 4.1 Apache 4.1 Apache Apache http://jakarta... 1.2 +2 -1 jakarta-avalon-excalibur/loader/src/test/org/apache/excalibur/loader/test/LoaderTestSuite.java Index: LoaderTestSuite.java =================================================================== RCS file: /home/cvs/jakarta-avalon-excalibur/loader/src/test/org/apache/excalibur/loader/test/LoaderTestSuite.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- LoaderTestSuite.java 7 Sep 2002 01:16:08 -0000 1.1 +++ LoaderTestSuite.java 7 Sep 2002 01:42:10 -0000 1.2 @@ -9,6 +9,7 @@ import junit.framework.Test; import junit.framework.TestSuite; +import org.apache.excalibur.loader.builder.test.ReaderTestCase; /** * A basic test suite that tests all the Loader package. @@ -18,7 +19,7 @@ public static Test suite() { final TestSuite suite = new TestSuite( "Loader Utilities" ); - //suite.addTest( new TestSuite( ResourceManagerTestCase.class ) ); + suite.addTest( new TestSuite( ReaderTestCase.class ) ); return suite; } } -- To unsubscribe, e-mail: For additional commands, e-mail: