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 22:54:38 UTC

svn commit: r473523 - in /incubator/roller/trunk/tests/org/apache/roller/business: CommentTest.java PermissionTest.java UserTest.java WeblogEntryTest.java WeblogPageTest.java WeblogTest.java

Author: agilliland
Date: Fri Nov 10 13:54:37 2006
New Revision: 473523

URL: http://svn.apache.org/viewvc?view=rev&rev=473523
Log:
a bit of tidy up on some of the business unit tests.


Modified:
    incubator/roller/trunk/tests/org/apache/roller/business/CommentTest.java
    incubator/roller/trunk/tests/org/apache/roller/business/PermissionTest.java
    incubator/roller/trunk/tests/org/apache/roller/business/UserTest.java
    incubator/roller/trunk/tests/org/apache/roller/business/WeblogEntryTest.java
    incubator/roller/trunk/tests/org/apache/roller/business/WeblogPageTest.java
    incubator/roller/trunk/tests/org/apache/roller/business/WeblogTest.java

Modified: incubator/roller/trunk/tests/org/apache/roller/business/CommentTest.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/CommentTest.java?view=diff&rev=473523&r1=473522&r2=473523
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/CommentTest.java (original)
+++ incubator/roller/trunk/tests/org/apache/roller/business/CommentTest.java Fri Nov 10 13:54:37 2006
@@ -1,24 +1,19 @@
 /*
-* 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.
-*/
-/*
- * CommentTest.java
+ * 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
  *
- * Created on April 12, 2006, 3:12 PM
+ *     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;
@@ -173,6 +168,7 @@
         comment3.setPending(Boolean.TRUE);
         comment3.setApproved(Boolean.FALSE);
         mgr.saveComment(comment3);
+        TestUtils.endSession(true);
         
         // get pending comments
         comments = null;

Modified: incubator/roller/trunk/tests/org/apache/roller/business/PermissionTest.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/PermissionTest.java?view=diff&rev=473523&r1=473522&r2=473523
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/PermissionTest.java (original)
+++ incubator/roller/trunk/tests/org/apache/roller/business/PermissionTest.java Fri Nov 10 13:54:37 2006
@@ -156,6 +156,7 @@
         perm.setPending(true);
         perm.setPermissionMask(PermissionsData.AUTHOR);
         mgr.savePermissions(perm);
+        TestUtils.endSession(true);
         
         // get pending permissions for a user
         perms = mgr.getPendingPermissions(testUser);

Modified: incubator/roller/trunk/tests/org/apache/roller/business/UserTest.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/UserTest.java?view=diff&rev=473523&r1=473522&r2=473523
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/UserTest.java (original)
+++ incubator/roller/trunk/tests/org/apache/roller/business/UserTest.java Fri Nov 10 13:54:37 2006
@@ -155,6 +155,7 @@
         // make sure disable users are not returned
         user.setEnabled(Boolean.FALSE);
         mgr.saveUser(user);
+        TestUtils.endSession(true);
         user = null;
         user = mgr.getUserByUserName(testUser.getUserName());
         assertNull(user);

Modified: incubator/roller/trunk/tests/org/apache/roller/business/WeblogEntryTest.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/WeblogEntryTest.java?view=diff&rev=473523&r1=473522&r2=473523
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/WeblogEntryTest.java (original)
+++ incubator/roller/trunk/tests/org/apache/roller/business/WeblogEntryTest.java Fri Nov 10 13:54:37 2006
@@ -709,7 +709,9 @@
         entry.addTag("three");
         entry.addTag("four");
         mgr.saveWeblogEntry(entry);
-
+        
+        TestUtils.endSession(true);
+        
         // let's fetch "site" tags now
         tags = mgr.getTags(null, null, null, -1);
         assertEquals(4, tags.size());
@@ -841,7 +843,9 @@
         entry.addTag("ONE");
         entry.addTag("three");
         mgr.saveWeblogEntry(entry);
-
+        
+        TestUtils.endSession(true);
+        
         // let's fetch "site" tags now
         tags = mgr.getTags(null, null, null, -1);
         assertEquals(3, tags.size());

Modified: incubator/roller/trunk/tests/org/apache/roller/business/WeblogPageTest.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/WeblogPageTest.java?view=diff&rev=473523&r1=473522&r2=473523
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/WeblogPageTest.java (original)
+++ incubator/roller/trunk/tests/org/apache/roller/business/WeblogPageTest.java Fri Nov 10 13:54:37 2006
@@ -1,24 +1,19 @@
 /*
-* 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.
-*/
-/*
- * WeblogPageTest.java
+ * 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
  *
- * Created on April 7, 2006, 2:57 PM
+ *     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;

Modified: incubator/roller/trunk/tests/org/apache/roller/business/WeblogTest.java
URL: http://svn.apache.org/viewvc/incubator/roller/trunk/tests/org/apache/roller/business/WeblogTest.java?view=diff&rev=473523&r1=473522&r2=473523
==============================================================================
--- incubator/roller/trunk/tests/org/apache/roller/business/WeblogTest.java (original)
+++ incubator/roller/trunk/tests/org/apache/roller/business/WeblogTest.java Fri Nov 10 13:54:37 2006
@@ -84,6 +84,8 @@
      */
     public void testWeblogCRUD() throws Exception {
         
+        log.info("BEGIN");
+        
         UserManager mgr = RollerFactory.getRoller().getUserManager();
         WebsiteData weblog = null;
         
@@ -135,6 +137,8 @@
         weblog = null;
         weblog = mgr.getWebsite(id);
         assertNull(weblog);
+        
+        log.info("END");
     }
     
     
@@ -165,6 +169,7 @@
         // make sure disable weblogs are not returned
         weblog.setEnabled(Boolean.FALSE);
         mgr.saveWebsite(weblog);
+        TestUtils.endSession(true);
         weblog = null;
         weblog = mgr.getWebsiteByHandle(testWeblog1.getHandle());
         assertNull(weblog);