Skip to content

Commit

Permalink
Use any(String.class) for commit message of centraldogma 2
Browse files Browse the repository at this point in the history
  • Loading branch information
lazmond3 committed Dec 13, 2021
1 parent f2ee11d commit 0f2db81
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,23 +155,23 @@ public void testRegisterWithDefaultSettings() {
CompletableFuture.completedFuture(Collections.emptyMap())
);
when(centralDogma.push(
PROJECT_NAME, REPOSITORY_NAME, Revision.HEAD,
String.format("[CentralDogmaPropertySupplier] Property file created: %s",
FILENAME),
Change.ofJsonUpsert(FILENAME, defaultProperties()))
eq(PROJECT_NAME), eq(REPOSITORY_NAME), eq(Revision.HEAD),
any(String.class),
eq(Change.ofJsonUpsert(FILENAME, defaultProperties())))
).thenReturn(
CompletableFuture.completedFuture(
new PushResult(Revision.HEAD, 1)
)
);

CentralDogmaPropertySupplier.register(centralDogma, PROJECT_NAME, REPOSITORY_NAME, FILENAME);

verify(centralDogma, times(1)).push(PROJECT_NAME, REPOSITORY_NAME, Revision.HEAD,
String.format(
"[CentralDogmaPropertySupplier] Property file created: %s",
FILENAME),
Change.ofJsonUpsert(FILENAME, defaultProperties()));
verify(centralDogma, times(1)).push(
eq(PROJECT_NAME),
eq(REPOSITORY_NAME),
eq(Revision.HEAD),
any(String.class),
eq(Change.ofJsonUpsert(FILENAME, defaultProperties()))
);

}

Expand Down

0 comments on commit 0f2db81

Please sign in to comment.