Coverage Report - org.mule.tck.model.AbstractProxyPoolFactoryTestCase
 
Classes in this File Line Coverage Branch Coverage Complexity
AbstractProxyPoolFactoryTestCase
100%
10/10
50%
2/4
1
 
 1  
 /*
 2  
  * $Id: AbstractProxyPoolFactoryTestCase.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.model;
 12  
 
 13  
 import org.mule.impl.MuleDescriptor;
 14  
 import org.mule.impl.model.MuleProxy;
 15  
 import org.mule.tck.AbstractMuleTestCase;
 16  
 import org.mule.tck.testmodels.fruit.Apple;
 17  
 import org.mule.util.ObjectFactory;
 18  
 import org.mule.util.ObjectPool;
 19  
 
 20  
 import com.mockobjects.dynamic.Mock;
 21  
 
 22  4
 public abstract class AbstractProxyPoolFactoryTestCase extends AbstractMuleTestCase
 23  
 {
 24  
     public void testCreateProxyFromFactory() throws Exception
 25  
     {
 26  6
         Mock mockPool = new Mock(ObjectPool.class);
 27  2
         MuleDescriptor descriptor = getTestDescriptor("apple", Apple.class.getName());
 28  2
         ObjectFactory factory = getProxyFactory(descriptor, (ObjectPool) mockPool.proxy());
 29  2
         Object result = factory.create();
 30  2
         assertNotNull(result);
 31  2
         MuleProxy proxy = (MuleProxy) result;
 32  2
         assertEquals("apple", proxy.getDescriptor().getName());
 33  2
         mockPool.verify();
 34  2
     }
 35  
 
 36  
     public abstract ObjectFactory getProxyFactory(MuleDescriptor descriptor, ObjectPool pool);
 37  
 }