org.sca4j.runtime.generic.junit
Class AbstractScaTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.sca4j.runtime.generic.junit.AbstractScaTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
AbstractTransactionalScaTest

public class AbstractScaTest
extends junit.framework.TestCase

Abstract super class for all JUnit test.


Field Summary
protected  org.sca4.runtime.generic.impl.GenericRuntimeImpl genericRuntime
           
 
Constructor Summary
AbstractScaTest(java.lang.String applicationScdl)
          Initialises the test with the application SCDL.
 
Method Summary
protected
<T> T
getBinding(java.lang.Class<T> endpointInterface, javax.xml.namespace.QName bindingType, java.net.URI endpointUri, javax.xml.namespace.QName... intents)
          Get the bindings with the specified intents.
protected  javax.persistence.EntityManager getEntityManager(java.lang.String name)
          Returns a named entity manager.
protected  java.util.Properties getHostProperties()
          Override if you want to provide additionalhost proeprties.
protected  javax.management.MBeanServer getMBeanServer()
          Override if you want to provide a different MBean server.
protected  org.sca4j.monitor.MonitorFactory getMonitorFactory()
          Override if you want to use a different monitor factory.
protected  java.util.Properties getProperties()
          Override if you want to provide a different set of host properties.
protected
<T> T
getServiceProxy(java.lang.String serviceName)
          Gets a service proxy.
protected  javax.transaction.TransactionManager getTransactionManager()
          Returns the transaction manager.
protected  void shutdown()
          Shuts down the runtime.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

genericRuntime

protected org.sca4.runtime.generic.impl.GenericRuntimeImpl genericRuntime
Constructor Detail

AbstractScaTest

public AbstractScaTest(java.lang.String applicationScdl)
Initialises the test with the application SCDL.

Parameters:
applicationScdl - Application SCDL.
Method Detail

shutdown

protected void shutdown()
Shuts down the runtime.


getServiceProxy

protected <T> T getServiceProxy(java.lang.String serviceName)
Gets a service proxy.

Type Parameters:
T - Type of the service proxy.
Parameters:
serviceName - Service name.
Returns:
Service proxy instance.

getMonitorFactory

protected org.sca4j.monitor.MonitorFactory getMonitorFactory()
Override if you want to use a different monitor factory.

Returns:
JDK 1.4 logging monitor factory.

getHostProperties

protected java.util.Properties getHostProperties()
Override if you want to provide additionalhost proeprties.

Returns:
System properties.

getMBeanServer

protected javax.management.MBeanServer getMBeanServer()
Override if you want to provide a different MBean server.

Returns:
Default platform MBean server.

getProperties

protected java.util.Properties getProperties()
Override if you want to provide a different set of host properties.

Returns:
System properties.

getTransactionManager

protected javax.transaction.TransactionManager getTransactionManager()
Returns the transaction manager.

Returns:
Gets the transaction manager.

getEntityManager

protected javax.persistence.EntityManager getEntityManager(java.lang.String name)
Returns a named entity manager.

Parameters:
name - Name of the entity manager persistence unit.
Returns:
ENtity manager instance.

getBinding

protected <T> T getBinding(java.lang.Class<T> endpointInterface,
                           javax.xml.namespace.QName bindingType,
                           java.net.URI endpointUri,
                           javax.xml.namespace.QName... intents)
Get the bindings with the specified intents.

Type Parameters:
T - Binding type.
Parameters:
endpointInterface - Endpoint interface for the binding.
bindingType - Qualified name of the bindings.
endpointUri - Endpoint URI.
intents - Intents that are requested.
Returns:
A proxy to the binding.


Copyright © 2008-2010 Service Symphony. All Rights Reserved.