From aa099d226c8a061c67276ca287993626cdde78ed Mon Sep 17 00:00:00 2001 From: Michael Minella Date: Mon, 13 May 2013 12:02:25 -0500 Subject: [PATCH] BATCHADM-161: Tightened up tests and XML configurations --- .../integration/launch/JobLaunchingGateway.java | 2 +- .../launch/JobLaunchingGatewayIntegrationTests.java | 5 ++++- .../xml/JobLaunchingGatewayParserTests-context.xml | 6 +----- ...nchingGatewayParserTestsNoJobLauncher-context.xml | 6 +----- ...JobLaunchingGatewayParserTestsRunning-context.xml | 6 +----- ...yParserTestsWithEnableBatchProcessing-context.xml | 4 ---- .../integration/config/xml/batch-setup-context.xml | 6 +----- .../JobLaunchingGatewayIntegrationTests-context.xml | 12 +++--------- 8 files changed, 12 insertions(+), 35 deletions(-) diff --git a/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java b/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java index f3b08e8b8..201a03d2e 100644 --- a/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java +++ b/spring-batch-integration/src/main/java/org/springframework/batch/integration/launch/JobLaunchingGateway.java @@ -39,7 +39,7 @@ public class JobLaunchingGateway extends AbstractReplyProducingMessageHandler { /** * Constructor taking a {@link JobLauncher} as parameter. * - * @param storedProcExecutor Must not be null. + * @param jobLauncher Must not be null. * */ public JobLaunchingGateway(JobLauncher jobLauncher) { diff --git a/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingGatewayIntegrationTests.java b/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingGatewayIntegrationTests.java index 879ceed94..9d5f02f2f 100644 --- a/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingGatewayIntegrationTests.java +++ b/spring-batch-integration/src/test/java/org/springframework/batch/integration/launch/JobLaunchingGatewayIntegrationTests.java @@ -15,10 +15,11 @@ */ package org.springframework.batch.integration.launch; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; import java.util.HashMap; import java.util.Map; @@ -89,6 +90,7 @@ public class JobLaunchingGatewayIntegrationTests { new JobParameters())); try { requestChannel.send(trigger); + fail(); } catch (MessagingException e) { String message = e.getMessage(); @@ -127,6 +129,7 @@ public class JobLaunchingGatewayIntegrationTests { try { requestChannel.send(stringMessage); + fail(); } catch (MessageHandlingException e) { String message = e.getCause().getMessage(); diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTests-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTests-context.xml index a74da9452..5271a948a 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTests-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTests-context.xml @@ -2,14 +2,10 @@ + http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd"> diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsNoJobLauncher-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsNoJobLauncher-context.xml index 9b7a982e9..f471cfa34 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsNoJobLauncher-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsNoJobLauncher-context.xml @@ -2,14 +2,10 @@ + http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd"> diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsRunning-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsRunning-context.xml index 06b3c25fb..f69a24803 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsRunning-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsRunning-context.xml @@ -2,14 +2,10 @@ + http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd"> diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsWithEnableBatchProcessing-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsWithEnableBatchProcessing-context.xml index 18813924f..2871b1225 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsWithEnableBatchProcessing-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/JobLaunchingGatewayParserTestsWithEnableBatchProcessing-context.xml @@ -2,15 +2,11 @@ diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/batch-setup-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/batch-setup-context.xml index 459ca6bcb..1aa9dae27 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/batch-setup-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/batch-setup-context.xml @@ -1,14 +1,10 @@ diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/launch/JobLaunchingGatewayIntegrationTests-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/launch/JobLaunchingGatewayIntegrationTests-context.xml index 880a4148c..0174d57db 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/launch/JobLaunchingGatewayIntegrationTests-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/launch/JobLaunchingGatewayIntegrationTests-context.xml @@ -1,18 +1,12 @@ + http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration.xsd"> +