KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > opensubsystems > blog > BlogTests


1 /*
2  * Copyright (c) 2006 - 2007 OpenSubsystems s.r.o. Slovak Republic. All rights reserved.
3  *
4  * Project: OpenChronicle
5  *
6  * $Id: BlogTests.java,v 1.3 2007/01/07 06:04:30 bastafidli Exp $
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * 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.persist.db.BlogDatabaseFactoryTest.BlogDatabaseFactoryTestInternal;
30 import org.opensubsystems.blog.persist.db.EntryDatabaseFactoryTest.EntryDatabaseFactoryTestInternal;
31 import org.opensubsystems.core.persist.db.DatabaseTestSetup;
32 import org.opensubsystems.core.persist.db.DatabaseTestSuite;
33
34 /**
35  * Test for classes working with blogs and belonging entries.
36  *
37  * @version $Id: BlogTests.java,v 1.3 2007/01/07 06:04:30 bastafidli Exp $
38  * @author Julian Legeny
39  * @code.reviewer TODO: Review this code
40  * @code.reviewed
41  */

42 public class BlogTests
43 {
44    // Constructors /////////////////////////////////////////////////////////////
45

46    /**
47     * Protected constructor since this class cannot be instantiated directly
48     */

49    protected BlogTests(
50    )
51    {
52       super();
53    }
54
55    // Public methods ///////////////////////////////////////////////////////////
56

57    /**
58     * Create suite of all question tests.
59     *
60     * @return Test - suite of tests to run
61     */

62    public static Test suite(
63    )
64    {
65       TestSuite suite = new DatabaseTestSuite("Test for blogs and entries");
66       addGenericTests(suite);
67       TestSetup wrapper = new DatabaseTestSetup(suite);
68
69       return wrapper;
70    }
71
72    /**
73     * Add all generic database tests to given suite.
74     *
75     * @param suite - suite of tests to run
76     */

77    public static void addGenericTests(
78       TestSuite suite
79    )
80    {
81       suite.addTestSuite(BlogDatabaseFactoryTestInternal.class);
82       suite.addTestSuite(EntryDatabaseFactoryTestInternal.class);
83       suite.addTestSuite(BlogControllerTestInternal.class);
84    }
85 }
86
Popular Tags