diff --git a/org.springframework.integration.file/src/main/resources/org/springframework/integration/file/config/spring-integration-file-1.0.xsd b/org.springframework.integration.file/src/main/resources/org/springframework/integration/file/config/spring-integration-file-1.0.xsd
index c6d45af2f6..7a8baa5e5b 100644
--- a/org.springframework.integration.file/src/main/resources/org/springframework/integration/file/config/spring-integration-file-1.0.xsd
+++ b/org.springframework.integration.file/src/main/resources/org/springframework/integration/file/config/spring-integration-file-1.0.xsd
@@ -156,6 +156,15 @@
]]>
+
+
+
+
+
+
diff --git a/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests-context.xml b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests-context.xml
index 300f6d9318..12a97fd028 100644
--- a/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests-context.xml
+++ b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests-context.xml
@@ -29,6 +29,12 @@
delete-source-files="true"
directory="${java.io.tmpdir}"/>
+
+
diff --git a/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests.java b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests.java
index f510fc80c0..d9ad985193 100644
--- a/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests.java
+++ b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundChannelAdapterParserTests.java
@@ -53,6 +53,10 @@ public class FileOutboundChannelAdapterParserTests {
@Qualifier("adapterWithDeleteFlag")
EventDrivenConsumer adapterWithDeleteFlag;
+ @Autowired
+ @Qualifier("adapterWithOrder")
+ EventDrivenConsumer adapterWithOrder;
+
@Test
public void simpleAdapter() {
@@ -88,4 +92,19 @@ public class FileOutboundChannelAdapterParserTests {
assertEquals(Boolean.TRUE, handlerAccessor.getPropertyValue("deleteSourceFiles"));
}
+ @Test
+ public void adapterWithOrder() {
+ DirectFieldAccessor adapterAccessor = new DirectFieldAccessor(adapterWithOrder);
+ FileWritingMessageHandler handler = (FileWritingMessageHandler)
+ adapterAccessor.getPropertyValue("handler");
+ DirectFieldAccessor handlerAccessor = new DirectFieldAccessor(handler);
+ assertEquals(555, handlerAccessor.getPropertyValue("order"));
+ }
+
+ @Test
+ public void adapterWithAutoStartupFalse() {
+ DirectFieldAccessor adapterAccessor = new DirectFieldAccessor(adapterWithOrder);
+ assertEquals(Boolean.FALSE, adapterAccessor.getPropertyValue("autoStartup"));
+ }
+
}
diff --git a/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundGatewayIntegrationTests-context.xml b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundGatewayIntegrationTests-context.xml
new file mode 100644
index 0000000000..c0014f3eb6
--- /dev/null
+++ b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundGatewayIntegrationTests-context.xml
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundGatewayParserTests-context.xml b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundGatewayParserTests-context.xml
new file mode 100644
index 0000000000..37e041e06f
--- /dev/null
+++ b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundGatewayParserTests-context.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
diff --git a/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundGatewayParserTests.java b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundGatewayParserTests.java
new file mode 100644
index 0000000000..574176a00c
--- /dev/null
+++ b/org.springframework.integration.file/src/test/java/org/springframework/integration/file/config/FileOutboundGatewayParserTests.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2002-2009 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.file.config;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+import org.springframework.beans.DirectFieldAccessor;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationContext;
+import org.springframework.integration.file.FileWritingMessageHandler;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+
+/**
+ * @author Mark Fisher
+ */
+@ContextConfiguration
+@RunWith(SpringJUnit4ClassRunner.class)
+public class FileOutboundGatewayParserTests {
+
+ @Autowired
+ private ApplicationContext context;
+
+
+ @Test
+ public void checkOrderedGateway() throws Exception {
+ Object gateway = context.getBean("ordered");
+ DirectFieldAccessor gatewayAccessor = new DirectFieldAccessor(gateway);
+ FileWritingMessageHandler handler = (FileWritingMessageHandler)
+ gatewayAccessor.getPropertyValue("handler");
+ assertEquals(Boolean.FALSE, gatewayAccessor.getPropertyValue("autoStartup"));
+ DirectFieldAccessor handlerAccessor = new DirectFieldAccessor(handler);
+ assertEquals(777, handlerAccessor.getPropertyValue("order"));
+ }
+
+}