This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<!-- ... --> | |
<build> | |
<pluginManagement> | |
<plugins> | |
<!-- ... --> | |
<plugin> | |
<artifactId>maven-surefire-plugin</artifactId> | |
<version>2.22.1</version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<!-- ... --> | |
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-dependency-plugin</artifactId> | |
<version>2.10</version> | |
<executions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<!-- ... --> | |
<repositories> | |
<repository> | |
<id>dynamodb-local-frankfurt</id> | |
<name>DynamoDB Local Release Repository</name> | |
<url>https://s3.eu-central-1.amazonaws.com/dynamodb-local-frankfurt/release</url> | |
</repository> | |
</repositories> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<!-- ... --> | |
<dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>com.amazonaws</groupId> | |
<artifactId>aws-java-sdk-bom</artifactId> | |
<version>${aws.java.sdk.version}</version> | |
<type>pom</type> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<!-- ... --> | |
<dependencies> | |
<!-- ... --> | |
<!-- DynamoDB sdk --> | |
<dependency> | |
<groupId>com.amazonaws</groupId> | |
<artifactId>aws-java-sdk-dynamodb</artifactId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UserRepoDynamoDBTest { | |
// ... | |
@Test | |
public void Given_UserRepoDynamoDB_Then_CreateAndReadUserSuccessfully() { | |
userDAO.createUser(UserMockData.USER_NEW); | |
UserModel loadedUser = userDAO.getUser(UserMockData.USER_NEW).get(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UserRepoDynamoDBTest { | |
// ... | |
@BeforeEach | |
public void beforeEachSetUp() { | |
ddbClient = new DynamoDBMapper(ddb); | |
DynamoDBLocalStarterTest.createTable( | |
ddb, USERS_TABLE_NAME, UserModel.HASH_KEY, ""); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UserRepoDynamoDBTest { | |
// ... | |
@BeforeAll | |
public static void setUp() { | |
ddb = DynamoDBLocalStarterTest.startDDBLocal(); | |
} | |
@AfterAll |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class UserRepoDynamoDBTest { | |
private static final String USERS_TABLE_NAME = "beta-us-west-2-users"; | |
private static AmazonDynamoDB ddb; | |
private DynamoDBMapper ddbClient; | |
private UserDAO userDAO; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DynamoDBLocalStarterTest { | |
// ... | |
public static CreateTableResult createTable( | |
AmazonDynamoDB ddb, String tableName, String hashKeyName, String rangeKeyName) { | |
List<AttributeDefinition> attributeDefinitions = new ArrayList<AttributeDefinition>(); | |
List<KeySchemaElement> ks = new ArrayList<KeySchemaElement>(); |
NewerOlder