Clover Coverage Report - Pebble 2.5-SNAPSHOT
Coverage timestamp: Sat Jun 12 2010 09:39:29 EST
8   35   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.
 
  AboutBlogActionTest       Line # 12 8 0% 3 0 100% 1.0
 
  (4)
 
1    package net.sourceforge.pebble.web.action;
2   
3    import net.sourceforge.pebble.Constants;
4    import net.sourceforge.pebble.web.view.View;
5    import net.sourceforge.pebble.web.view.impl.BlogDetailsView;
6   
7    /**
8    * Tests for the AboutBlogAction class.
9    *
10    * @author Simon Brown
11    */
 
12    public class AboutBlogActionTest extends SecureActionTestCase {
13   
 
14  4 toggle protected void setUp() throws Exception {
15  4 action = new AboutBlogAction();
16   
17  4 super.setUp();
18    }
19   
 
20  2 toggle public void testProcess() throws Exception {
21  2 View view = action.process(request, response);
22  2 assertTrue(view instanceof BlogDetailsView);
23    }
24   
25    /**
26    * Test that only blog contributors have access to add a blog entry.
27    */
 
28  2 toggle public void testOnlyBlogContributorsHaveAccess() {
29  2 String roles[] = action.getRoles(request);
30  2 assertEquals(2, roles.length);
31  2 assertEquals(Constants.BLOG_ADMIN_ROLE, roles[0]);
32  2 assertEquals(Constants.BLOG_OWNER_ROLE, roles[1]);
33    }
34   
35    }