Package csw.testkit
Class LocationTestKit
- java.lang.Object
-
- csw.testkit.LocationTestKit
-
public final class LocationTestKit extends java.lang.Object
LocationTestKit supports starting HTTP Location Server backed by Akka cluster and Distributed DataExample:
private val testKit = LocationTestKit() // starting Location Server (starts location server on default ports specified in configuration file) testKit.startLocationServer() // stopping alarm server testKit.shutdownLocationServer()
-
-
Constructor Summary
Constructors Constructor Description LocationTestKit()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description csw.aas.http.SecurityDirectives
_securityDirectives()
static LocationTestKit
apply(TestKitSettings testKitSettings, boolean enableAuth)
Create a LocationTestKitstatic LocationTestKit
create()
Java API for creating LocationTestKitstatic LocationTestKit
create(TestKitSettings testKitSettings)
Java API for creating LocationTestKitscala.Function1<org.mockito.invocation.InvocationOnMock,org.mockito.ReflectionUtils.InvocationOnMockOps>
invocationOps()
csw.aas.http.PolicyValidator
policyValidator()
void
shutdownLocationServer()
Shutdown HTTP location servervoid
startLocationServer()
Start HTTP location server on default port 7654akka.util.Timeout
timeout()
msocket.security.api.TokenValidator
tokenValidator()
static LocationTestKit
withAuth(com.typesafe.config.Config config)
Create a LocationTestKit
-
-
-
Method Detail
-
apply
public static LocationTestKit apply(TestKitSettings testKitSettings, boolean enableAuth)
Create a LocationTestKitWhen the test has completed you should shutdown the location server with
shutdownLocationServer()
.- Parameters:
testKitSettings
- (undocumented)enableAuth
- (undocumented)- Returns:
- (undocumented)
-
withAuth
public static LocationTestKit withAuth(com.typesafe.config.Config config)
Create a LocationTestKitWhen the test has completed you should shutdown the location server with
shutdownLocationServer()
.- Parameters:
config
- (undocumented)- Returns:
- (undocumented)
-
create
public static LocationTestKit create()
Java API for creating LocationTestKit- Returns:
- handle to LocationTestKit which can be used to start and stop location server
-
create
public static LocationTestKit create(TestKitSettings testKitSettings)
Java API for creating LocationTestKit- Parameters:
testKitSettings
- custom testKitSettings- Returns:
- handle to LocationTestKit which can be used to start and stop location server
-
tokenValidator
public msocket.security.api.TokenValidator tokenValidator()
-
policyValidator
public csw.aas.http.PolicyValidator policyValidator()
-
_securityDirectives
public csw.aas.http.SecurityDirectives _securityDirectives()
-
invocationOps
public scala.Function1<org.mockito.invocation.InvocationOnMock,org.mockito.ReflectionUtils.InvocationOnMockOps> invocationOps()
-
timeout
public akka.util.Timeout timeout()
-
startLocationServer
public void startLocationServer()
Start HTTP location server on default port 7654Location server is required to be running on a machine before starting components. (HCD's, Assemblies etc.)
-
shutdownLocationServer
public void shutdownLocationServer()
Shutdown HTTP location serverWhen the test has completed, make sure you shutdown location server.
-
-