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 ofSBTestEnvironment
for use bySBServerManager
instances. Retrieve the singletonDEFAULT_ENVIRONMENT
for most uses.- Since:
- 6.6
-
-
Field Summary
Fields Modifier and Type Field Description static SBTestEnvironment
DEFAULT_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 String
getConf()
Map<String,String>
getEngineSystemProperties()
NowImplementation
getNowImpl()
boolean
isAppDebuggingEnabled()
boolean
isIntermediateStreamDequeueEnabled()
void
setNowImpl(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:
isIntermediateStreamDequeueEnabled
in interfaceSBTestEnvironment
- Returns:
- whether intermediate stream dequeueing should be enabled
-
isAppDebuggingEnabled
public boolean isAppDebuggingEnabled()
- Specified by:
isAppDebuggingEnabled
in interfaceSBTestEnvironment
- Returns:
- whether the debugger should be enabled
-
getConf
public String getConf() throws StreamBaseException
- Specified by:
getConf
in 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:
getNowImpl
in interfaceSBTestEnvironment
- Returns:
- the
NowImplementation
value corresponding to the current implementation of now() function
-
setNowImpl
public void setNowImpl(NowImplementation nowImpl) throws StreamBaseException
Description copied from interface:SBTestEnvironment
Set the current implementation of now() function- Specified by:
setNowImpl
in interfaceSBTestEnvironment
- Parameters:
nowImpl
- theNowImplementation
value corresponding to the current implementation of now() function- Throws:
StreamBaseException
- if any error occurs
-
getEngineSystemProperties
public Map<String,String> getEngineSystemProperties()
- Specified by:
getEngineSystemProperties
in interfaceSBTestEnvironment
- Returns:
- the engine-specific system properties associated with this environment, an empty map if none. Default implementation returns an empty map.
-
-