-
Couldn't load subscription status.
- Fork 38.8k
Closed
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: taskA general taskA general task
Milestone
Description
Whilst migrating DefaultNamespaceHandlerResolverTests.testResolveInvalidHandler to AssertJ I discovered the current tests doesn't fail as expected.
@Test
public void testResolveInvalidHandler() throws Exception {
String mappingPath = "org/springframework/beans/factory/xml/support/invalid.properties";
try {
new DefaultNamespaceHandlerResolver(getClass().getClassLoader(), mappingPath);
fail("Should not be able to map a class that doesn't implement NamespaceHandler");
}
catch (Throwable expected) {
}
}The constructor does not actually throw an exception, the fail method is called but the AssertionError is then swallowed by the catch block so the test passes.
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: taskA general taskA general task