Clover Coverage Report - Pebble 2.5-SNAPSHOT
Coverage timestamp: Sat Jun 12 2010 09:39:29 EST
8   33   3   2,67
0   20   0,38   3
3     1  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  ViewCategoriesActionTest       Line # 12 8 0% 3 0 100% 1.0
 
  (4)
 
1    package net.sourceforge.pebble.web.action;
2   
3    import net.sourceforge.pebble.web.view.View;
4    import net.sourceforge.pebble.web.view.impl.CategoriesView;
5    import net.sourceforge.pebble.Constants;
6   
7    /**
8    * Tests for the ViewCategoriesAction class.
9    *
10    * @author Simon Brown
11    */
 
12    public class ViewCategoriesActionTest extends SecureActionTestCase {
13   
 
14  4 toggle protected void setUp() throws Exception {
15  4 action = new ViewCategoriesAction();
16   
17  4 super.setUp();
18    }
19   
 
20  2 toggle public void testViewTags() throws Exception {
21  2 View view = action.process(request, response);
22   
23  2 assertTrue(view instanceof CategoriesView);
24  2 assertEquals("/WEB-INF/jsp/manageCategories.jsp", ((CategoriesView)view).getUri());
25    }
26   
 
27  2 toggle public void testOnlyBlogContributorsHaveAccess() {
28  2 String roles[] = action.getRoles(request);
29  2 assertEquals(1, roles.length);
30  2 assertEquals(Constants.BLOG_CONTRIBUTOR_ROLE, roles[0]);
31    }
32   
33    }