Skip to content

Commit 3198757

Browse files
quaffmp911de
authored andcommitted
Correct method parameter type in tests.
Before this commit, actual method parameter type doesn't match method signature. Closes #2928
1 parent 264ba2b commit 3198757

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/test/java/org/springframework/data/repository/core/support/EventPublishingRepositoryProxyPostProcessorUnitTests.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.util.Arrays;
2828
import java.util.Collection;
2929
import java.util.Collections;
30+
import java.util.List;
3031
import java.util.UUID;
3132

3233
import org.aopalliance.aop.Advice;
@@ -194,7 +195,7 @@ void publishesEventsForCallToSaveWithIterable() throws Throwable {
194195

195196
var event = new SomeEvent();
196197
var sample = MultipleEvents.of(Collections.singletonList(event));
197-
mockInvocation(invocation, SampleRepository.class.getMethod("saveAll", Iterable.class), sample);
198+
mockInvocation(invocation, SampleRepository.class.getMethod("saveAll", Iterable.class), List.of(sample));
198199

199200
EventPublishingMethodInterceptor//
200201
.of(EventPublishingMethod.of(MultipleEvents.class), publisher)//
@@ -208,7 +209,7 @@ void publishesEventsForCallToDeleteWithIterable() throws Throwable {
208209

209210
var event = new SomeEvent();
210211
var sample = MultipleEvents.of(Collections.singletonList(event));
211-
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAll", Iterable.class), sample);
212+
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAll", Iterable.class), List.of(sample));
212213

213214
EventPublishingMethodInterceptor//
214215
.of(EventPublishingMethod.of(MultipleEvents.class), publisher)//
@@ -222,7 +223,7 @@ void publishesEventsForCallToDeleteInBatchWithIterable() throws Throwable {
222223

223224
var event = new SomeEvent();
224225
var sample = MultipleEvents.of(Collections.singletonList(event));
225-
mockInvocation(invocation, SampleRepository.class.getMethod("deleteInBatch", Iterable.class), sample);
226+
mockInvocation(invocation, SampleRepository.class.getMethod("deleteInBatch", Iterable.class), List.of(sample));
226227

227228
EventPublishingMethodInterceptor//
228229
.of(EventPublishingMethod.of(MultipleEvents.class), publisher)//
@@ -236,7 +237,7 @@ void publishesEventsForCallToDeleteAllInBatchWithIterable() throws Throwable {
236237

237238
var event = new SomeEvent();
238239
var sample = MultipleEvents.of(Collections.singletonList(event));
239-
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAllInBatch", Iterable.class), sample);
240+
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAllInBatch", Iterable.class), List.of(sample));
240241

241242
EventPublishingMethodInterceptor//
242243
.of(EventPublishingMethod.of(MultipleEvents.class), publisher)//

0 commit comments

Comments
 (0)