Coverage report

  %line %branch
org.demosys.web.story.impl.MemoryStoryService
36% 
75% 

 1  
 /*
 2  
  * Demosys.
 3  
  *
 4  
  * Terms of license - http://opensource.org/licenses/apachepl.php
 5  
  */
 6  
 package org.demosys.web.story.impl;
 7  
 import java.util.HashMap;
 8  
 import org.demosys.web.story.CreateStoryException;
 9  
 import org.demosys.web.story.StoryService;
 10  
 import org.demosys.web.story.StoryView;
 11  
 /**
 12  
  */
 13  18
 public class MemoryStoryService implements StoryService {
 14  18
     private HashMap memory = new HashMap();
 15  
 
 16  
     public synchronized void newStory(StoryView story)
 17  
         throws CreateStoryException {
 18  0
         if (memory.containsKey(story.getTitle())) {
 19  6
             throw new CreateStoryException("Existe deja en Base");
 20  6
         }
 21  
 
 22  0
         memory.put(story.getTitle(), story.clone());
 23  0
     }
 24  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.