Skip to content

Commit e901923

Browse files
quaffmp911de
authored andcommitted
Correct method parameter type in tests.
Before this commit, actual method parameter type doesn't match method signature. Closes spring-projects#2928
1 parent b1a0bb4 commit e901923

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
@@ -23,6 +23,7 @@
2323
import java.util.Arrays;
2424
import java.util.Collection;
2525
import java.util.Collections;
26+
import java.util.List;
2627
import java.util.UUID;
2728

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

190191
var event = new SomeEvent();
191192
var sample = MultipleEvents.of(Collections.singletonList(event));
192-
mockInvocation(invocation, SampleRepository.class.getMethod("saveAll", Iterable.class), sample);
193+
mockInvocation(invocation, SampleRepository.class.getMethod("saveAll", Iterable.class), List.of(sample));
193194

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

204205
var event = new SomeEvent();
205206
var sample = MultipleEvents.of(Collections.singletonList(event));
206-
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAll", Iterable.class), sample);
207+
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAll", Iterable.class), List.of(sample));
207208

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

218219
var event = new SomeEvent();
219220
var sample = MultipleEvents.of(Collections.singletonList(event));
220-
mockInvocation(invocation, SampleRepository.class.getMethod("deleteInBatch", Iterable.class), sample);
221+
mockInvocation(invocation, SampleRepository.class.getMethod("deleteInBatch", Iterable.class), List.of(sample));
221222

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

232233
var event = new SomeEvent();
233234
var sample = MultipleEvents.of(Collections.singletonList(event));
234-
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAllInBatch", Iterable.class), sample);
235+
mockInvocation(invocation, SampleRepository.class.getMethod("deleteAllInBatch", Iterable.class), List.of(sample));
235236

236237
EventPublishingMethodInterceptor//
237238
.of(EventPublishingMethod.of(MultipleEvents.class), publisher)//

0 commit comments

Comments
 (0)