Class AbstractDynamoDbJunit
- java.lang.Object
-
- net.officefloor.nosql.dynamodb.test.AbstractDynamoDbConnectJunit
-
- net.officefloor.nosql.dynamodb.test.AbstractDynamoDbJunit
-
- Direct Known Subclasses:
DynamoDbExtension
,DynamoDbRule
public class AbstractDynamoDbJunit extends AbstractDynamoDbConnectJunit
Abstract JUnit DynamoDb functionality.- Author:
- Daniel Sagenschneider
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.officefloor.nosql.dynamodb.test.AbstractDynamoDbConnectJunit
AbstractDynamoDbConnectJunit.Configuration
-
-
Field Summary
-
Fields inherited from class net.officefloor.nosql.dynamodb.test.AbstractDynamoDbConnectJunit
configuration, DEFAULT_LOCAL_DYNAMO_PORT, dynamoFactory
-
-
Constructor Summary
Constructors Constructor Description AbstractDynamoDbJunit()
Instantiate with defaultAbstractDynamoDbConnectJunit.Configuration
.AbstractDynamoDbJunit(AbstractDynamoDbConnectJunit.Configuration configuration)
Instantiate.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
extendStart()
Allows overriding to extend starting.protected void
extendStop()
Allows overriding to extend stop.com.amazonaws.services.dynamodbv2.AmazonDynamoDB
getAmazonDynamoDb()
Obtains theAmazonDynamoDB
.static DockerContainerInstance
startDynamoDb(int port, java.lang.String dockerNetworkName)
Starts DynamoDb.-
Methods inherited from class net.officefloor.nosql.dynamodb.test.AbstractDynamoDbConnectJunit
getDynamoDbMapper, getDynamoDbPort, startAmazonDynamoDb, stopAmazonDynamoDb
-
-
-
-
Constructor Detail
-
AbstractDynamoDbJunit
public AbstractDynamoDbJunit()
Instantiate with defaultAbstractDynamoDbConnectJunit.Configuration
.
-
AbstractDynamoDbJunit
public AbstractDynamoDbJunit(AbstractDynamoDbConnectJunit.Configuration configuration)
Instantiate.- Parameters:
configuration
-AbstractDynamoDbConnectJunit.Configuration
.
-
-
Method Detail
-
startDynamoDb
public static DockerContainerInstance startDynamoDb(int port, java.lang.String dockerNetworkName) throws java.lang.Exception
Starts DynamoDb.
This should not be called directly. It is available for OfficeFloor testing infrastructure to have consistent way to run DynamoDb.
- Parameters:
port
- Port to run DynamoDB on.dockerNetworkName
- Optional docker network name. May benull
.- Returns:
DockerContainerInstance
for running DynamoDb.- Throws:
java.lang.Exception
- If fails to start DynamoDb.
-
getAmazonDynamoDb
public com.amazonaws.services.dynamodbv2.AmazonDynamoDB getAmazonDynamoDb()
Description copied from class:AbstractDynamoDbConnectJunit
Obtains theAmazonDynamoDB
.- Overrides:
getAmazonDynamoDb
in classAbstractDynamoDbConnectJunit
- Returns:
AmazonDynamoDB
.
-
extendStart
protected void extendStart() throws java.lang.Exception
Description copied from class:AbstractDynamoDbConnectJunit
Allows overriding to extend starting.- Overrides:
extendStart
in classAbstractDynamoDbConnectJunit
- Throws:
java.lang.Exception
- Possible start failure.
-
extendStop
protected void extendStop() throws java.lang.Exception
Description copied from class:AbstractDynamoDbConnectJunit
Allows overriding to extend stop.- Overrides:
extendStop
in classAbstractDynamoDbConnectJunit
- Throws:
java.lang.Exception
- Possible start failure.
-
-