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 of `SBTestEnvironment` for use by `SBServerManager` instances. Retrieve the singleton `BaseTestEnvironment.DEFAULT_ENVIRONMENT` for most uses.
  Since:
    6.6

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SBTestEnvironment` | `DEFAULT_ENVIRONMENT`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `BaseTestEnvironment()` Create a basic test environment that configures from a server configuration file per a system property
    `BaseTestEnvironment(String confFilePath)` Create a basic test environment that uses a specific configuration file

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getConf()`
    `NowImplementation` | `getNowImpl()`
    `boolean` | `isAppDebuggingEnabled()`
    `boolean` | `isIntermediateStreamDequeueEnabled()`
    `void` | `setNowImpl(NowImplementation nowImpl)` Set the current implementation of now() function

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### DEFAULT_ENVIRONMENT

          public static SBTestEnvironment DEFAULT_ENVIRONMENT

      See Also:
        `BaseTestEnvironment.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

  - ### Method Detail

    - #### isIntermediateStreamDequeueEnabled

          public boolean isIntermediateStreamDequeueEnabled()

      Specified by:
        `isIntermediateStreamDequeueEnabled` in interface `SBTestEnvironment`
      Returns:
        whether intermediate stream dequeueing should be enabled

    - #### isAppDebuggingEnabled

          public boolean isAppDebuggingEnabled()

      Specified by:
        `isAppDebuggingEnabled` in interface `SBTestEnvironment`
      Returns:
        whether the debugger should be enabled

    - #### getConf

          public String getConf()
                         throws StreamBaseException

      Specified by:
        `getConf` in interface `SBTestEnvironment`
      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 interface `SBTestEnvironment`
      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 interface `SBTestEnvironment`
      Parameters:
        `nowImpl` - the `NowImplementation` value corresponding to the current implementation of now() function
      Throws:
        `StreamBaseException` - if any error occurs

Copyright © 2015–2018 Cloud Software Group, Inc.. All rights reserved.