The @Splitter annotation no longer has a "channel" attribute. Instead it uses the @MessageEndpoint's "defaultOutput" attribute (INT-189).
This commit is contained in:
@@ -1,15 +1,31 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.integration.config;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.beans.DirectFieldAccessor;
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.integration.bus.MessageBus;
|
||||
import org.springframework.integration.endpoint.ConcurrentHandler;
|
||||
import org.springframework.integration.endpoint.DefaultMessageEndpoint;
|
||||
import org.springframework.integration.handler.MessageHandlerChain;
|
||||
import org.springframework.integration.router.AggregatingMessageHandler;
|
||||
@@ -34,8 +50,8 @@ public class CompletionStrategyAnnotationTests {
|
||||
|
||||
@Test(expected=BeanCreationException.class)
|
||||
public void testInvalidAnnotation() {
|
||||
ApplicationContext context = new ClassPathXmlApplicationContext(
|
||||
new String[] { "classpath:/org/springframework/integration/config/testInvalidCompletionStrategyAnnotation.xml" });
|
||||
new ClassPathXmlApplicationContext(new String[] {
|
||||
"classpath:/org/springframework/integration/config/testInvalidCompletionStrategyAnnotation.xml" });
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -127,7 +127,7 @@ public class CorrelationIdTests {
|
||||
ChannelRegistry channelRegistry = new DefaultChannelRegistry();
|
||||
channelRegistry.registerChannel("testChannel", testChannel);
|
||||
Map<String, String> attributes = new HashMap<String, String>();
|
||||
attributes.put("channel", "testChannel");
|
||||
attributes.put(AbstractMessageHandlerAdapter.DEFAULT_OUTPUT_CHANNEL_NAME_KEY, "testChannel");
|
||||
SplitterMessageHandlerAdapter<TestBean> splitter = new SplitterMessageHandlerAdapter<TestBean>(
|
||||
new TestBean(), TestBean.class.getMethod("split", String.class), attributes);
|
||||
splitter.setChannelRegistry(channelRegistry);
|
||||
|
||||
@@ -32,6 +32,7 @@ import org.springframework.integration.ConfigurationException;
|
||||
import org.springframework.integration.channel.ChannelRegistry;
|
||||
import org.springframework.integration.channel.DefaultChannelRegistry;
|
||||
import org.springframework.integration.channel.SimpleChannel;
|
||||
import org.springframework.integration.handler.AbstractMessageHandlerAdapter;
|
||||
import org.springframework.integration.message.Message;
|
||||
import org.springframework.integration.message.StringMessage;
|
||||
|
||||
@@ -51,7 +52,7 @@ public class SplitterMessageHandlerAdapterTests {
|
||||
|
||||
public SplitterMessageHandlerAdapterTests() {
|
||||
this.channelRegistry.registerChannel("testChannel", testChannel);
|
||||
this.attribs.put(SplitterMessageHandlerAdapter.CHANNEL_KEY, "testChannel");
|
||||
this.attribs.put(AbstractMessageHandlerAdapter.DEFAULT_OUTPUT_CHANNEL_NAME_KEY, "testChannel");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user