Package com.streambase.sb.unittest
Class BaseTestEnvironment
- java.lang.Object
 - 
- com.streambase.sb.unittest.BaseTestEnvironment
 
 
- 
- All Implemented Interfaces:
 SBTestEnvironment
public class BaseTestEnvironment extends Object implements SBTestEnvironment
A default implementation ofSBTestEnvironmentfor use bySBServerManagerinstances. Retrieve the singletonDEFAULT_ENVIRONMENTfor most uses.- Since:
 - 6.6
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description static SBTestEnvironmentDEFAULT_ENVIRONMENT 
- 
Constructor Summary
Constructors Constructor Description BaseTestEnvironment()Create a basic test environment that configures from a server configuration file per a system propertyBaseTestEnvironment(String confFilePath)Create a basic test environment that uses a specific configuration fileBaseTestEnvironment(String confFilePath, Map<String,String> engineSystemProperties)Create a basic test environment that uses a specific configuration file 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetConf()Map<String,String>getEngineSystemProperties()NowImplementationgetNowImpl()booleanisAppDebuggingEnabled()booleanisIntermediateStreamDequeueEnabled()voidsetNowImpl(NowImplementation nowImpl)Set the current implementation of now() function 
 - 
 
- 
- 
Field Detail
- 
DEFAULT_ENVIRONMENT
public static SBTestEnvironment DEFAULT_ENVIRONMENT
- See Also:
 BaseTestEnvironment()
 
 - 
 
- 
Constructor Detail
- 
BaseTestEnvironment
public BaseTestEnvironment()
Create a basic test environment that configures from a server configuration file per a system property- See Also:
 UnitTestProperties.SERVER_CONF_PATH
 
- 
BaseTestEnvironment
public BaseTestEnvironment(String confFilePath)
Create a basic test environment that uses a specific configuration file- Parameters:
 confFilePath- The path to the conf file- Since:
 - 6.6.13
 
 
- 
BaseTestEnvironment
public BaseTestEnvironment(String confFilePath, Map<String,String> engineSystemProperties)
Create a basic test environment that uses a specific configuration file- Parameters:
 confFilePath- The path to the conf fileengineSystemProperties- any engine-specific system properties associated with this environment, an empty map if none- Since:
 - 10.5.0
 
 
 - 
 
- 
Method Detail
- 
isIntermediateStreamDequeueEnabled
public boolean isIntermediateStreamDequeueEnabled()
- Specified by:
 isIntermediateStreamDequeueEnabledin interfaceSBTestEnvironment- Returns:
 - whether intermediate stream dequeueing should be enabled
 
 
- 
isAppDebuggingEnabled
public boolean isAppDebuggingEnabled()
- Specified by:
 isAppDebuggingEnabledin interfaceSBTestEnvironment- Returns:
 - whether the debugger should be enabled
 
 
- 
getConf
public String getConf() throws StreamBaseException
- Specified by:
 getConfin interfaceSBTestEnvironment- Returns:
 - the contents of a StreamBase configuration file that should not be null
 - Throws:
 StreamBaseException- if any error occurs accessing the configuration
 
- 
getNowImpl
public NowImplementation getNowImpl()
- Specified by:
 getNowImplin interfaceSBTestEnvironment- Returns:
 - the 
NowImplementationvalue corresponding to the current implementation of now() function 
 
- 
setNowImpl
public void setNowImpl(NowImplementation nowImpl) throws StreamBaseException
Description copied from interface:SBTestEnvironmentSet the current implementation of now() function- Specified by:
 setNowImplin interfaceSBTestEnvironment- Parameters:
 nowImpl- theNowImplementationvalue corresponding to the current implementation of now() function- Throws:
 StreamBaseException- if any error occurs
 
- 
getEngineSystemProperties
public Map<String,String> getEngineSystemProperties()
- Specified by:
 getEngineSystemPropertiesin interfaceSBTestEnvironment- Returns:
 - the engine-specific system properties associated with this environment, an empty map if none. Default implementation returns an empty map.
 
 
 - 
 
 -