|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2019 the original author or authors. |
| 2 | + * Copyright 2002-2022 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
18 | 18 |
|
19 | 19 | import static org.assertj.core.api.Assertions.assertThat;
|
20 | 20 |
|
21 |
| -import org.junit.Test; |
22 |
| -import org.junit.runner.RunWith; |
| 21 | +import org.junit.jupiter.api.Test; |
23 | 22 |
|
24 | 23 | import org.springframework.beans.factory.annotation.Autowired;
|
25 | 24 | import org.springframework.beans.factory.annotation.Qualifier;
|
|
32 | 31 | import org.springframework.messaging.Message;
|
33 | 32 | import org.springframework.messaging.MessageChannel;
|
34 | 33 | import org.springframework.messaging.MessageHandler;
|
35 |
| -import org.springframework.test.context.ContextConfiguration; |
36 |
| -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; |
| 34 | +import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; |
37 | 35 |
|
38 | 36 | /**
|
39 | 37 | * @author Mark Fisher
|
40 | 38 | * @author Artem Bilan
|
41 | 39 | * @since 2.0
|
42 | 40 | */
|
43 |
| -@ContextConfiguration |
44 |
| -@RunWith(SpringJUnit4ClassRunner.class) |
| 41 | +@SpringJUnitConfig |
45 | 42 | public class GroovySplitterTests {
|
46 | 43 |
|
47 | 44 | @Autowired
|
@@ -82,10 +79,10 @@ public void inlineScript() {
|
82 | 79 | public void testInt2433VerifyRiddingOfMessageProcessorsWrapping() {
|
83 | 80 | assertThat(this.groovySplitterMessageHandler instanceof MethodInvokingSplitter).isTrue();
|
84 | 81 | @SuppressWarnings("rawtypes")
|
85 |
| - MessageProcessor messageProcessor = TestUtils.getPropertyValue(this.groovySplitterMessageHandler, |
86 |
| - "messageProcessor", MessageProcessor.class); |
| 82 | + MessageProcessor messageProcessor = |
| 83 | + TestUtils.getPropertyValue(this.groovySplitterMessageHandler, "processor", MessageProcessor.class); |
87 | 84 | //before it was MethodInvokingMessageProcessor
|
88 |
| - assertThat(messageProcessor instanceof GroovyScriptExecutingMessageProcessor).isTrue(); |
| 85 | + assertThat(messageProcessor).isInstanceOf(GroovyScriptExecutingMessageProcessor.class); |
89 | 86 | }
|
90 | 87 |
|
91 | 88 | }
|
0 commit comments