Clover Coverage Report - Pebble 2.5-SNAPSHOT
Coverage timestamp: Sat Jun 12 2010 09:39:29 EST
../../../../../img/srcFileCovDistChart5.png 38% of files have more coverage
2   62   4   0,5
0   18   2   4
4     1  
1    
This report was generated with an evaluation server license. Purchase Clover or configure your license.
 
  MockCategoryDAO       Line # 15 2 0% 4 3 50% 0.5
 
No Tests
 
1    package net.sourceforge.pebble.dao.mock;
2   
3    import net.sourceforge.pebble.dao.CategoryDAO;
4    import net.sourceforge.pebble.dao.PersistenceException;
5    import net.sourceforge.pebble.domain.Category;
6    import net.sourceforge.pebble.domain.CategoryBuilder;
7    import net.sourceforge.pebble.domain.Blog;
8   
9    /**
10    * A mock implementation of the CategoryDAO interface that does nothing. This
11    * is used when performing unit tests.
12    *
13    * @author Simon Brown
14    */
 
15    public class MockCategoryDAO implements CategoryDAO {
16   
17    /**
18    * Gets the categories for a particular blog.
19    *
20    * @param blog the owning blog
21    * @return a Collection of Category instances
22    * @throws PersistenceException if categories cannot be loaded
23    */
 
24  1318 toggle public Category getCategories(Blog blog) throws PersistenceException {
25  1318 CategoryBuilder builder = new CategoryBuilder(blog);
26  1318 return builder.getRootCategory();
27    }
28   
29    /**
30    * Adds the specified category.
31    *
32    * @param category the Category instance to be added
33    * @param blog the owning blog
34    * @throws net.sourceforge.pebble.dao.PersistenceException
35    * if something goes wrong storing the category
36    */
 
37  0 toggle public void addCategory(Category category, Blog blog) throws PersistenceException {
38    }
39   
40    /**
41    * Updates the specified category.
42    *
43    * @param category the Category instance to be updated
44    * @param blog the owning blog
45    * @throws net.sourceforge.pebble.dao.PersistenceException
46    * if something goes wrong storing the category
47    */
 
48  0 toggle public void updateCategory(Category category, Blog blog) throws PersistenceException {
49    }
50   
51    /**
52    * Removes the specified category.
53    *
54    * @param category the Category instance to be removed
55    * @param blog the owning blog
56    * @throws net.sourceforge.pebble.dao.PersistenceException
57    * if something goes wrong removing the category
58    */
 
59  0 toggle public void deleteCategory(Category category, Blog blog) throws PersistenceException {
60    }
61   
62    }