Clover coverage report - CRISPY - 1.1.1
Coverage timestamp: Mi Nov 15 2006 13:09:46 CET
file stats: LOC: 32   Methods: 1
NCLOC: 18   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ClassMethodMapInvocationStrategy.java 100% 100% 100% 100%
coverage
 1    package net.sf.crispy.strategy;
 2   
 3    import java.util.HashMap;
 4    import java.util.Map;
 5   
 6    import net.sf.crispy.InvocationException;
 7    import net.sf.crispy.InvocationStrategy;
 8   
 9    /**
 10    * Put Class-Name and Method-name in a Map:
 11    * <code>
 12    * Map map = new HashMap(1);
 13    * map.put(className, methodName);
 14    * </code>
 15    * @author Linke
 16    *
 17    */
 18    public class ClassMethodMapInvocationStrategy implements InvocationStrategy {
 19   
 20  57 public Object convert(Map pvPropertyMap) {
 21  57 String lvClass = (String) pvPropertyMap.get(InvocationStrategy.CLASS_NAME);
 22  57 String lvMethod = (String) pvPropertyMap.get(InvocationStrategy.METHOD_NAME);
 23  57 if ((lvClass == null) || (lvMethod == null)) {
 24  2 throw new InvocationException("Error in the InvocationStrategy " +this.getClass().getName() + ". "
 25    + "The class: " + lvClass + " and the method: " + lvMethod + " must be unequal null!");
 26    }
 27  55 Map lvMap = new HashMap(1);
 28  55 lvMap.put(lvClass, lvMethod);
 29  55 return lvMap;
 30    }
 31   
 32    }