-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Closed
Copy link
Labels
in: testIssues in the test moduleIssues in the test modulestatus: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning processAn outdated, unresolved issue that's closed in bulk as part of a cleaning process
Description
Rob Winch opened SPR-15034 and commented
It would be nice if #16647 could support verifying errors. For example something like this:
@Test(expected = BeanDefinitionParsingException.class)
@ContextConfiguration("classpath:/just-this-method.xml")
public void testBeanDefinitionParsingException() {}It would also be nice if we could access the entire Exception for verifying the description / caused by, etc.
@Test
@ContextConfiguration("classpath:/just-this-method.xml")
public void testBeanDefinitionParsingException(@ExpectedException BeanDefinitionParsingException expected) {
assertThat(expected).hasDescription("Ooops");
}Issue Links:
- Support @ContextConfiguration at method level [SPR-12031] #16647 Support
@ContextConfigurationat method level ("depends on")
Metadata
Metadata
Assignees
Labels
in: testIssues in the test moduleIssues in the test modulestatus: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning processAn outdated, unresolved issue that's closed in bulk as part of a cleaning process