NativeTestRegistry.h

00001 /*
00002  * @(#)NativeTestRegistry.h  0.2.0 / 2007-09-07
00003  *
00004  * Copyright (c) 2007, ETF and contributors. All rights reserved.
00005  *
00006  * This software is licensed under the LGPL, version 2.1, license.
00007  * A copy of the license is included in the file LICENSE-LGPL.txt.
00008  */
00009 #ifndef NATIVETESTREGISTRY_H
00010 #define NATIVETESTREGISTRY_H
00011 
00012 #ifdef JAVAQX_TEST
00013 
00014 #include "NativeTestFactory.h"
00015 
00016 /*^**************************************************************************^*/
00017 /*- NativeTestRegistry Class.                                                -*/
00018 /*^**************************************************************************^*/
00019 
00020 typedef QList<AbstractNativeTestFactory *> NativeTestFactories;
00021 typedef QMap<QString, NativeTestFactories *> NativeTestModules;
00022 
00029 class JAVAQX_EXPORT NativeTestRegistry
00030 {
00031 private:
00032   NativeTestRegistry();
00033   ~NativeTestRegistry();
00034 public:
00035   static bool registerTestFactory(const QString &module,
00036                                   AbstractNativeTestFactory *testFactory);
00037   static jobjectArray getTestModules(JNIEnv *env);
00038   static jobjectArray getTestCases(JNIEnv *env, jstring testModule);
00039   static jlong createTestCase(JNIEnv *env, jstring testModule,
00040                               jstring testCase);
00041 private:
00042   static NativeTestModules *modules; 
00043 };
00044 
00045 #endif // JAVAQX_TEST
00046 
00047 #endif // NATIVETESTREGISTRY_H
00048 
00049 /*^*****************************************************************************
00050   File History:
00051 
00052  - 2007-09-07 19:10:04 Slobodan
00053    Initial version
00054 
00055 *****************************************************************************^*/

Copyright © 2007 ETF and contributors. All Rights Reserved.