Skip to content

Commit

Permalink
fixed incompatibility with varargs
Browse files Browse the repository at this point in the history
  • Loading branch information
musketyr committed Jul 12, 2024
1 parent ddb48fd commit a8d0383
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,16 +56,18 @@ class DeclarativeServiceTest {
)
Assertions.assertNotNull(
s.saveAll(
listOf(
createEntity("3", "1", "foo", Date.from(REFERENCE_DATE.plus(7, ChronoUnit.DAYS))),
createEntity("3", "2", "bar", Date.from(REFERENCE_DATE.plus(14, ChronoUnit.DAYS)))
)
)
)
Assertions.assertNotNull(s.get("1", "1"))
Assertions.assertNotNull(s.load("1", "1"))
Assertions.assertEquals(2, s.getAll("1", Arrays.asList("2", "1"))!!.size)
Assertions.assertEquals(2, s.loadAll("1", Arrays.asList("2", "1"))!!.size)
Assertions.assertEquals(2, s.getAll("1", "2", "1")!!.size)
Assertions.assertEquals(0, s.loadAll("1", "3", "4")!!.size)
Assertions.assertEquals(2, s.getAll("1", listOf("2", "1"))!!.size)
Assertions.assertEquals(0, s.loadAll("1", listOf("3", "4"))!!.size)
Assertions.assertEquals(2, s.count("1"))
Assertions.assertEquals(1, s.count("1", "1"))
Assertions.assertEquals(1, s.countByRangeIndex("1", "bar"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ interface DynamoDBEntityService {
fun loadAll(hash: String?, rangeKeys: List<String?>?): List<DynamoDBEntity?>?
fun loadAll(hash: String?, vararg rangeKeys: String?): List<DynamoDBEntity?>?
fun save(entity: DynamoDBEntity?): DynamoDBEntity?
fun saveAll(vararg entities: DynamoDBEntity?): List<DynamoDBEntity?>?
fun saveAll(entities: Iterable<DynamoDBEntity?>?): List<DynamoDBEntity?>?
fun count(hashKey: String?): Int
fun count(hashKey: String?, rangeKey: String?): Int
Expand Down

0 comments on commit a8d0383

Please sign in to comment.