use of software.amazon.awssdk.enhanced.dynamodb.functionaltests.models.FakeItemWithBinaryKey in project aws-sdk-java-v2 by aws.
the class CreateTableOperationTest method generateRequest_withBinaryKey.
@Test
public void generateRequest_withBinaryKey() {
CreateTableOperation<FakeItemWithBinaryKey> operation = CreateTableOperation.create(CreateTableEnhancedRequest.builder().build());
CreateTableRequest request = operation.generateRequest(FakeItemWithBinaryKey.getTableSchema(), PRIMARY_CONTEXT, null);
assertThat(request.tableName(), is(TABLE_NAME));
assertThat(request.keySchema(), containsInAnyOrder(KeySchemaElement.builder().attributeName("id").keyType(HASH).build()));
assertThat(request.globalSecondaryIndexes(), is(empty()));
assertThat(request.localSecondaryIndexes(), is(empty()));
assertThat(request.attributeDefinitions(), containsInAnyOrder(AttributeDefinition.builder().attributeName("id").attributeType(ScalarAttributeType.B).build()));
}
Aggregations