01: /*
02: * Copyright (c) 2006 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
03: *
04: * Project: OpenChronicle
05: *
06: * $Id: BlogTests.java,v 1.3 2007/02/01 07:32:05 bastafidli Exp $
07: *
08: * This program is free software; you can redistribute it and/or modify
09: * it under the terms of the GNU General Public License as published by
10: * the Free Software Foundation; version 2 of the License.
11: *
12: * This program is distributed in the hope that it will be useful,
13: * but WITHOUT ANY WARRANTY; without even the implied warranty of
14: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15: * GNU General Public License for more details.
16: *
17: * You should have received a copy of the GNU General Public License
18: * along with this program; if not, write to the Free Software
19: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20: */
21:
22: package org.opensubsystems.blog;
23:
24: import junit.extensions.TestSetup;
25: import junit.framework.Test;
26: import junit.framework.TestSuite;
27:
28: import org.opensubsystems.blog.logic.BlogControllerTest.BlogControllerTestInternal;
29: import org.opensubsystems.blog.logic.EntryControllerTest.EntryControllerTestInternal;
30: import org.opensubsystems.blog.persist.db.BlogDatabaseFactoryTest.BlogDatabaseFactoryTestInternal;
31: import org.opensubsystems.blog.persist.db.EntryDatabaseFactoryTest.EntryDatabaseFactoryTestInternal;
32: import org.opensubsystems.core.persist.db.DatabaseTestSetup;
33: import org.opensubsystems.core.persist.db.DatabaseTestSuite;
34:
35: /**
36: * Test for classes working with blogs and belonging entries.
37: *
38: * @version $Id: BlogTests.java,v 1.3 2007/02/01 07:32:05 bastafidli Exp $
39: * @author Julian Legeny
40: * @code.reviewer TODO: Review this code
41: * @code.reviewed
42: */
43: public class BlogTests {
44: // Constructors /////////////////////////////////////////////////////////////
45:
46: /**
47: * Protected constructor since this class cannot be instantiated directly
48: */
49: protected BlogTests() {
50: super ();
51: }
52:
53: // Public methods ///////////////////////////////////////////////////////////
54:
55: /**
56: * Create suite of all question tests.
57: *
58: * @return Test - suite of tests to run
59: */
60: public static Test suite() {
61: TestSuite suite = new DatabaseTestSuite(
62: "Test for blogs and entries");
63: addGenericTests(suite);
64: TestSetup wrapper = new DatabaseTestSetup(suite);
65:
66: return wrapper;
67: }
68:
69: /**
70: * Add all generic database tests to given suite.
71: *
72: * @param suite - suite of tests to run
73: */
74: public static void addGenericTests(TestSuite suite) {
75: suite.addTestSuite(BlogDatabaseFactoryTestInternal.class);
76: suite.addTestSuite(EntryDatabaseFactoryTestInternal.class);
77: suite.addTestSuite(BlogControllerTestInternal.class);
78: suite.addTestSuite(EntryControllerTestInternal.class);
79: }
80: }
|