Skip to content

Commit

Permalink
Correct method parameter type in tests.
Browse files Browse the repository at this point in the history
Before this commit, actual method parameter type doesn't match method signature.

Closes #2928
  • Loading branch information
quaff authored and mp911de committed Sep 14, 2023
1 parent b1a0bb4 commit e901923
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.UUID;

import org.aopalliance.aop.Advice;
Expand Down Expand Up @@ -189,7 +190,7 @@ void publishesEventsForCallToSaveWithIterable() throws Throwable {

var event = new SomeEvent();
var sample = MultipleEvents.of(Collections.singletonList(event));
mockInvocation(invocation, SampleRepository.class.getMethod("saveAll", Iterable.class), sample);
mockInvocation(invocation, SampleRepository.class.getMethod("saveAll", Iterable.class), List.of(sample));

EventPublishingMethodInterceptor//
.of(EventPublishingMethod.of(MultipleEvents.class), publisher)//
Expand All @@ -203,7 +204,7 @@ void publishesEventsForCallToDeleteWithIterable() throws Throwable {

var event = new SomeEvent();
var sample = MultipleEvents.of(Collections.singletonList(event));
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAll", Iterable.class), sample);
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAll", Iterable.class), List.of(sample));

EventPublishingMethodInterceptor//
.of(EventPublishingMethod.of(MultipleEvents.class), publisher)//
Expand All @@ -217,7 +218,7 @@ void publishesEventsForCallToDeleteInBatchWithIterable() throws Throwable {

var event = new SomeEvent();
var sample = MultipleEvents.of(Collections.singletonList(event));
mockInvocation(invocation, SampleRepository.class.getMethod("deleteInBatch", Iterable.class), sample);
mockInvocation(invocation, SampleRepository.class.getMethod("deleteInBatch", Iterable.class), List.of(sample));

EventPublishingMethodInterceptor//
.of(EventPublishingMethod.of(MultipleEvents.class), publisher)//
Expand All @@ -231,7 +232,7 @@ void publishesEventsForCallToDeleteAllInBatchWithIterable() throws Throwable {

var event = new SomeEvent();
var sample = MultipleEvents.of(Collections.singletonList(event));
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAllInBatch", Iterable.class), sample);
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAllInBatch", Iterable.class), List.of(sample));

EventPublishingMethodInterceptor//
.of(EventPublishingMethod.of(MultipleEvents.class), publisher)//
Expand Down

0 comments on commit e901923

Please sign in to comment.