Coverage Report - org.mule.tck.testmodels.mule.TestDependentObject
 
Classes in this File Line Coverage Branch Coverage Complexity
TestDependentObject
0%
0/4
0%
0/4
3
 
 1  
 /*
 2  
  * $Id: TestDependentObject.java 7963 2007-08-21 08:53:15Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.tck.testmodels.mule;
 12  
 
 13  
 import org.mule.config.PropertyFactory;
 14  
 import org.mule.tck.testmodels.fruit.Orange;
 15  
 
 16  
 import java.util.Map;
 17  
 
 18  
 /**
 19  
  * <code>TestDependentObject</code> is used as a mock dependency for an object
 20  
  */
 21  0
 public class TestDependentObject implements PropertyFactory
 22  
 {
 23  
     public Object create(Map properties) throws Exception
 24  
     {
 25  
         // make sure that both test properties are set here
 26  0
         if (properties.get("test1") == null || properties.get("test2") == null)
 27  
         {
 28  0
             throw new Exception("Both properties should be set before the factory method is called");
 29  
         }
 30  0
         return new Orange();
 31  
     }
 32  
 }