List of usage examples for org.springframework.beans.factory.parsing BeanDefinitionParsingException getMessage
@Override
@Nullable
public String getMessage()
From source file:org.springframework.integration.amqp.config.AmqpOutboundChannelAdapterParserTests.java
@Test public void testInt2971HeaderMapperAndMappedHeadersExclusivity() { try {/* w w w . j a v a 2 s . c o m*/ new ClassPathXmlApplicationContext( "AmqpOutboundChannelAdapterParserTests-headerMapper-fail-context.xml", this.getClass()).close(); } catch (BeanDefinitionParsingException e) { assertTrue(e.getMessage().startsWith("Configuration problem: The 'header-mapper' attribute " + "is mutually exclusive with 'mapped-request-headers' or 'mapped-reply-headers'")); } }
From source file:org.springframework.security.config.SecurityNamespaceHandlerTests.java
@Test public void pre32SchemaAreNotSupported() throws Exception { try {/*from w w w.j a v a 2s . com*/ new InMemoryXmlApplicationContext("<user-service id='us'>" + " <user name='bob' password='bobspassword' authorities='ROLE_A' />" + "</user-service>", "3.0.3", null); fail("Expected BeanDefinitionParsingException"); } catch (BeanDefinitionParsingException expected) { assertThat(expected.getMessage().contains("You cannot use a spring-security-2.0.xsd")); } }