You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2006/11/10 23:23:44 UTC

svn commit: r473532 - in /incubator/roller/trunk/tests/org/apache/roller/business: CoreBusinessServicesTestSuite.java CoreWeblogPlatformTestSuite.java CoreWeblogServicesTestSuite.java SupplementalWeblogServicesTestSuite.java

Author: agilliland
Date: Fri Nov 10 14:23:44 2006
New Revision: 473532

URL: http://svn.apache.org/viewvc?view=rev&rev=473532
Log:
adding a set of junit TestSuites which group the unit tests into logical blocks so that testing can follow a more ordered progression.


Added:
    incubator/roller/trunk/tests/org/apache/roller/business/CoreBusinessServicesTestSuite.java
    incubator/roller/trunk/tests/org/apache/roller/business/CoreWeblogPlatformTestSuite.java
    incubator/roller/trunk/tests/org/apache/roller/business/CoreWeblogServicesTestSuite.java
    incubator/roller/trunk/tests/org/apache/roller/business/SupplementalWeblogServicesTestSuite.java

Added: incubator/roller/trunk/tests/org/apache/roller/business/CoreBusinessServicesTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/CoreBusinessServicesTestSuite.java?view=auto&rev=473532
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/CoreBusinessServicesTestSuite.java (added)
+++ incubator/roller/trunk/tests/org/apache/roller/business/CoreBusinessServicesTestSuite.java Fri Nov 10 14:23:44 2006
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
+package org.apache.roller.business;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * Test core business services.
+ *
+ * The core business services are the things which allow the business layer as
+ * a whole to function.  Examples would be the PropertiesManager which is
+ * involved in servicing the core application config.
+ *
+ * Tests from from this suite should only include things that are not part of
+ * or dependent on the core weblog platform, i.e. you don't need a user or a
+ * weblog to do them.
+ */
+public class CoreBusinessServicesTestSuite {
+    
+    public static Test suite() {
+
+        TestSuite suite = new TestSuite();
+	
+        // TODO: add a test for RollerConfig & RollerRuntimeConfig
+        
+        // test untime properties
+        suite.addTestSuite(PropertiesTest.class);
+
+        // test background task locking process
+        suite.addTestSuite(TaskLockTest.class);
+
+        return suite;
+    }
+    
+}

Added: incubator/roller/trunk/tests/org/apache/roller/business/CoreWeblogPlatformTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/CoreWeblogPlatformTestSuite.java?view=auto&rev=473532
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/CoreWeblogPlatformTestSuite.java (added)
+++ incubator/roller/trunk/tests/org/apache/roller/business/CoreWeblogPlatformTestSuite.java Fri Nov 10 14:23:44 2006
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
+package org.apache.roller.business;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * Test core weblog platform.
+ *
+ * This basically means bare weblogs themselves along with components they are
+ * directly related on to provide a core weblog platform.  For example we will
+ * want to test Weblogs, Users, and Permissions here.
+ */
+public class CoreWeblogPlatformTestSuite {
+    
+    public static Test suite() {
+
+        TestSuite suite = new TestSuite();
+	
+        // test users
+        suite.addTestSuite(UserTest.class);
+
+        // test weblogs
+        suite.addTestSuite(WeblogTest.class);
+
+        // test permissions
+        suite.addTestSuite(PermissionTest.class);
+
+        return suite;
+    }
+    
+}

Added: incubator/roller/trunk/tests/org/apache/roller/business/CoreWeblogServicesTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/CoreWeblogServicesTestSuite.java?view=auto&rev=473532
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/CoreWeblogServicesTestSuite.java (added)
+++ incubator/roller/trunk/tests/org/apache/roller/business/CoreWeblogServicesTestSuite.java Fri Nov 10 14:23:44 2006
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
+package org.apache.roller.business;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * Test core weblog services.
+ *
+ * This test suite should test all of the most essential and core functions of
+ * a weblog, such as managing entries, categories, comments, etc.  These items
+ * are expected to be dependent on the core weblog platform to function.
+ */
+public class CoreWeblogServicesTestSuite {
+    
+    public static Test suite() {
+
+        TestSuite suite = new TestSuite();
+	
+        // test entries
+        suite.addTestSuite(WeblogEntryTest.class);
+
+        // test categories
+        suite.addTestSuite(WeblogCategoryTest.class);
+
+        // test templates
+        suite.addTestSuite(WeblogPageTest.class);
+        
+        // test comments
+        suite.addTestSuite(CommentTest.class);
+
+        return suite;
+    }
+    
+}

Added: incubator/roller/trunk/tests/org/apache/roller/business/SupplementalWeblogServicesTestSuite.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/SupplementalWeblogServicesTestSuite.java?view=auto&rev=473532
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/SupplementalWeblogServicesTestSuite.java (added)
+++ incubator/roller/trunk/tests/org/apache/roller/business/SupplementalWeblogServicesTestSuite.java Fri Nov 10 14:23:44 2006
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
+package org.apache.roller.business;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+
+/**
+ * Test supplemental weblog services.
+ *
+ * This test suite should test all of the supplemental functions of a weblog. 
+ * These are the things that aren't quite as much of a core component as some
+ * of the other services.  The main point of this is to break up the testing
+ * into reasonable groupings though.
+ */
+public class SupplementalWeblogServicesTestSuite {
+    
+    public static Test suite() {
+
+        TestSuite suite = new TestSuite();
+	
+        suite.addTestSuite(FileManagerTest.class);
+
+        suite.addTestSuite(HitCountTest.class);
+
+        suite.addTestSuite(PingsTest.class);
+        
+        suite.addTestSuite(BookmarkTest.class);
+        
+        suite.addTestSuite(RefererTest.class);
+        
+        suite.addTestSuite(PlanetManagerTest.class);
+
+        return suite;
+    }
+    
+}