|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| This report was generated with an evaluation server license. Purchase Clover or configure your license. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| MockRefererFilterDAO | Line # 17 | 1 | 0% | 3 | 1 | 75% |
0.75
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
| (4) | |||
| Result | |||
|
0.25
|
net.sourceforge.pebble.domain.RefererFilterManagerTest.testAddFilter
net.sourceforge.pebble.domain.RefererFilterManagerTest.testAddFilter
|
1 PASS | |
|
0.25
|
net.sourceforge.pebble.domain.RefererFilterManagerTest.testAddDuplicateFilter
net.sourceforge.pebble.domain.RefererFilterManagerTest.testAddDuplicateFilter
|
1 PASS | |
|
0.25
|
net.sourceforge.pebble.domain.RefererFilterManagerTest.testAddDuplicateFilter
net.sourceforge.pebble.domain.RefererFilterManagerTest.testAddDuplicateFilter
|
1 PASS | |
|
0.25
|
net.sourceforge.pebble.domain.RefererFilterManagerTest.testAddFilter
net.sourceforge.pebble.domain.RefererFilterManagerTest.testAddFilter
|
1 PASS | |
| 1 | package net.sourceforge.pebble.dao.mock; | |
| 2 | ||
| 3 | import net.sourceforge.pebble.dao.PersistenceException; | |
| 4 | import net.sourceforge.pebble.dao.RefererFilterDAO; | |
| 5 | import net.sourceforge.pebble.domain.Blog; | |
| 6 | import net.sourceforge.pebble.domain.RefererFilter; | |
| 7 | ||
| 8 | import java.util.Collection; | |
| 9 | import java.util.HashSet; | |
| 10 | ||
| 11 | /** | |
| 12 | * A mock implementation of the CategoryDAO interface that does nothing. This | |
| 13 | * is used when performing unit tests. | |
| 14 | * | |
| 15 | * @author Simon Brown | |
| 16 | */ | |
| 17 | public class MockRefererFilterDAO implements RefererFilterDAO { | |
| 18 | ||
| 19 | /** | |
| 20 | * Loads the referer filters. | |
| 21 | * | |
| 22 | * @param rootBlog the owning Blog instance | |
| 23 | * @return a Collection of RefererFilter instances | |
| 24 | * @throws PersistenceException if filters cannot be loaded | |
| 25 | */ | |
| 26 | 1326 |
public Collection getRefererFilters(Blog rootBlog) throws PersistenceException { |
| 27 | 1326 | return new HashSet(); |
| 28 | } | |
| 29 | ||
| 30 | /** | |
| 31 | * Adds the specified referer filter. | |
| 32 | * | |
| 33 | * @param filter the RefererFilter instance to be added | |
| 34 | * @param rootBlog the owning Blog instance | |
| 35 | * @throws PersistenceException if something goes wrong storing the filters | |
| 36 | */ | |
| 37 | 4 |
public void addRefererFilter(RefererFilter filter, Blog rootBlog) throws PersistenceException { |
| 38 | } | |
| 39 | ||
| 40 | /** | |
| 41 | * Removes the specified referer filter. | |
| 42 | * | |
| 43 | * @param filter the RefererFilter instance to be removed | |
| 44 | * @param rootBlog the owning Blog instance | |
| 45 | * @throws net.sourceforge.pebble.dao.PersistenceException | |
| 46 | * if something goes wrong removing the filter | |
| 47 | */ | |
| 48 | 0 |
public void deleteRefererFilter(RefererFilter filter, Blog rootBlog) throws PersistenceException { |
| 49 | } | |
| 50 | ||
| 51 | } | |
|
||||||||||||