Fixed unit tests due to changes in exception messages
This commit is contained in:
@@ -43,9 +43,9 @@ public class JpaPagingItemReaderIntegrationTests extends AbstractGenericDataSour
|
||||
|
||||
String jpqlQuery = "select f from Foo f where name like :name";
|
||||
|
||||
JpaPagingItemReader<Foo> inputSource = new JpaPagingItemReader<Foo>();
|
||||
JpaPagingItemReader<Foo> inputSource = new JpaPagingItemReader<>();
|
||||
inputSource.setQueryString(jpqlQuery);
|
||||
inputSource.setParameterValues(Collections.singletonMap("name", (Object)"bar%"));
|
||||
inputSource.setParameterValues(Collections.singletonMap("name", "bar%"));
|
||||
inputSource.setEntityManagerFactory(entityManagerFactory);
|
||||
inputSource.setPageSize(3);
|
||||
inputSource.afterPropertiesSet();
|
||||
|
||||
@@ -12,14 +12,9 @@
|
||||
*/
|
||||
package org.springframework.batch.integration.config.xml;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import org.junit.After;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.batch.core.launch.JobLauncher;
|
||||
import org.springframework.batch.integration.launch.JobLaunchingMessageHandler;
|
||||
import org.springframework.beans.factory.BeanCreationException;
|
||||
@@ -30,6 +25,12 @@ import org.springframework.integration.core.MessagingTemplate;
|
||||
import org.springframework.integration.endpoint.EventDrivenConsumer;
|
||||
import org.springframework.integration.test.util.TestUtils;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Gunnar Hillert
|
||||
@@ -77,7 +78,7 @@ public class JobLaunchingGatewayParserTests {
|
||||
setUp("JobLaunchingGatewayParserTestsNoJobLauncher-context.xml", getClass());
|
||||
}
|
||||
catch(BeanCreationException e) {
|
||||
assertEquals("No bean named 'jobLauncher' is defined", e.getCause().getMessage());
|
||||
assertEquals("No bean named 'jobLauncher' available", e.getCause().getMessage());
|
||||
return;
|
||||
}
|
||||
fail("Expected a NoSuchBeanDefinitionException to be thrown.");
|
||||
|
||||
Reference in New Issue
Block a user