package testkit
- Alphabetic
- Public
- Protected
Type Members
- final class AlarmTestKit extends RedisStore
AlarmTestKit supports starting Alarm server using embedded redis internally (sentinel + master) and registering it with location service
AlarmTestKit supports starting Alarm server using embedded redis internally (sentinel + master) and registering it with location service
Example:
private val testKit = AlarmTestKit() // starting alarm server (start sentinel and master on default ports specified in configuration file) // it will also register AlarmService with location service testKit.startAlarmService() // stopping alarm server testKit.shutdownAlarmService()
- final class ConfigTestKit extends MockedAuthentication
ConfigTestKit supports starting HTTP Config Server backed by SVN and registering it with location service
ConfigTestKit supports starting HTTP Config Server backed by SVN and registering it with location service
Example:
private val testKit = ConfigTestKit() // starting Config Server (starts config server on default ports specified in configuration file) // it will also register ConfigService with location service testKit.startConfigServer() // stopping Config Server testKit.shutdownConfigServer()
- final class DatabaseTestKit extends EmbeddedPG
DatabaseTestKit supports starting Database server using embedded postgres and registering it with location service, and creating a client for the database server
DatabaseTestKit supports starting Database server using embedded postgres and registering it with location service, and creating a client for the database server
Example:
private val testKit = DatabaseTestKit() // starting postgres server // it will also register DatabaseService with location service testKit.startDatabaseService() // stopping postgres server testKit.shutdownDatabaseService() //creates an instance of database service factory val dbServiceFactory = testKit.databaseServiceFactory() //creates a client for the particular database in database server val dsl = testKit.dslContext()
- final class EventTestKit extends RedisStore
EventTestKit supports starting Alarm server using embedded redis internally (sentinel + master) and registering it with location service
EventTestKit supports starting Alarm server using embedded redis internally (sentinel + master) and registering it with location service
Example:
private val testKit = EventTestKit() // starting event server (start sentinel on port 6379 and master on port 6378) // it will also register EventService with location service testKit.startEventService(sentinelPort = 6379, serverPort = 6378) // stopping event server testKit.shutdownEventService()
- final class FrameworkTestKit extends AnyRef
FrameworkTestKit supports starting one or more services from csw.testkit.scaladsl.CSWService It also provides helpers to spawn components in standalone or container mode
FrameworkTestKit supports starting one or more services from csw.testkit.scaladsl.CSWService It also provides helpers to spawn components in standalone or container mode
Example:
private val testKit = FrameworkTestKit() // this will start Event and Alarm Server (Note: Location Server will always be started as it is required by all other services) testKit.start(EventServer, AlarmServer) // spawn component in standalone mode testKit.spawnStandalone(ConfigFactory.load("standalone.conf")) // stopping services testKit.shutdown()
- final class LocationTestKit extends MockedAuthentication
LocationTestKit supports starting HTTP Location Server backed by Akka cluster and Distributed Data
LocationTestKit supports starting HTTP Location Server backed by Akka cluster and Distributed Data
Example:
private val testKit = LocationTestKit() // starting Location Server (starts location server on default ports specified in configuration file) testKit.startLocationServer() // stopping alarm server testKit.shutdownLocationServer()
- final class TestKitSettings extends AnyRef
Value Members
- object AlarmTestKit
- object ConfigTestKit
- object DatabaseTestKit
- object EventTestKit
- object FrameworkTestKit
- object LocationTestKit
- object TestKitSettings