KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > test > OzoneTestSuiteLoader


1 // You can redistribute this software and/or modify it under the terms of
2
// the Ozone Library License version 1 published by ozone-db.org.
3
//
4
// The original code and portions created by DigitalSeame are
5
// Copyright (C) 1997-2000 by DigitalSesame All rights reserved.
6
//
7
// $Id$
8

9 package test;
10
11 import junit.runner.TestSuiteLoader;
12
13 /**
14  * <p>This is a TestSuiteLoader for Ozone's database.
15  *
16  * <p>The problem with standard JUnit is that it create new
17  * classloader for each test suite. This does not work well with
18  * Ozone. It case a lot of confusion in determining the equivlance of
19  * object.
20  *
21  * @author <a HREF="http://www.softwarebuero.de/">SMB</a>
22  * @author <a HREF="mailto:david@d11e.com">David Li</a>
23  * @version $Revision$Date$
24  */

25 class OzoneTestSuiteLoader implements TestSuiteLoader {
26
27     private ClassLoader JavaDoc fClassLoader = null;
28
29     protected OzoneTestSuiteLoader() {
30         fClassLoader = OzoneTestSuiteLoader.class.getClassLoader();
31     }
32
33     public Class JavaDoc load(String JavaDoc suiteClassName) throws ClassNotFoundException JavaDoc {
34         return fClassLoader.loadClass(suiteClassName);
35     }
36
37     public Class JavaDoc reload(Class JavaDoc aClass) throws ClassNotFoundException JavaDoc {
38         return aClass;
39     }
40 }
41
Popular Tags