Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Commit

Permalink
fixed codenarc violations
Browse files Browse the repository at this point in the history
  • Loading branch information
musketyr committed Jul 24, 2019
1 parent 76b5564 commit b814c26
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable
import groovy.transform.Canonical
import groovy.transform.CompileStatic

/**
* Testing entity.
*/
@Canonical
@CompileStatic
@DynamoDBTable(tableName = "IntroProblemEntity")
@DynamoDBTable(tableName = 'IntroProblemEntity')
class IntroProblemEntity {

@DynamoDBHashKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ import com.amazonaws.services.dynamodbv2.datamodeling.DynamoDBTable
import groovy.transform.Canonical
import groovy.transform.CompileStatic

/**
* Testing entity.
*/
@Canonical
@CompileStatic
@DynamoDBTable(tableName = "IntroProblemEntity2")
@DynamoDBTable(tableName = 'IntroProblemEntity2')
class IntroProblemEntity2 {

@DynamoDBHashKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package com.agorapulse.micronaut.aws.dynamodb.intro

import com.agorapulse.micronaut.aws.dynamodb.annotation.Service

/**
* Testing service.
*/
@Service(IntroProblemEntity2)
interface IntroProblemEntity2DBService {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ package com.agorapulse.micronaut.aws.dynamodb.intro

import com.agorapulse.micronaut.aws.dynamodb.annotation.Service

/**
* Testing service.
*/
@Service(IntroProblemEntity)
interface IntroProblemEntityDBService {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ import spock.lang.Specification

import javax.inject.Singleton

/**
* Tests that guarantees that more than one DynamoDB service can be injected into the service which was previously
* not working due the following bug.
*
* @see https://github.com/micronaut-projects/micronaut-core/issues/1851
*/
class IntroductionIssueSpec extends Specification {

@AutoCleanup ApplicationContext context
Expand All @@ -18,7 +24,6 @@ class IntroductionIssueSpec extends Specification {

IDynamoDBMapper mapper = DynamoDB.createMapper(dru)


void setup() {
dru.add(new IntroProblemEntity(hashKey: 'hash1'))
dru.add(new IntroProblemEntity2(hashKey: 'hash2'))
Expand All @@ -28,8 +33,6 @@ class IntroductionIssueSpec extends Specification {
context.start()
}



void 'can inject two data services'() {
given:
Injected service = context.getBean(Injected)
Expand Down

0 comments on commit b814c26

Please sign in to comment.