Skip to content

Commit

Permalink
Drop DefaultNamespaceHandlerResolverTests.testResolveInvalidHandler
Browse files Browse the repository at this point in the history
Closes gh-22994
  • Loading branch information
jhoeller committed May 20, 2019
1 parent 52e02de commit 7edf8ac
Showing 1 changed file with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2019 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -49,7 +49,7 @@ public void testResolvedMappedHandlerWithNoArgCtor() {
}

@Test
public void testNonExistentHandlerClass() throws Exception {
public void testNonExistentHandlerClass() {
String mappingPath = "org/springframework/beans/factory/xml/support/nonExistent.properties";
try {
new DefaultNamespaceHandlerResolver(getClass().getClassLoader(), mappingPath);
Expand All @@ -61,29 +61,18 @@ public void testNonExistentHandlerClass() throws Exception {
}

@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) {
}
}

@Test
public void testCtorWithNullClassLoaderArgument() throws Exception {
public void testCtorWithNullClassLoaderArgument() {
// simply must not bail...
new DefaultNamespaceHandlerResolver(null);
}

@Test(expected = IllegalArgumentException.class)
public void testCtorWithNullClassLoaderArgumentAndNullMappingLocationArgument() throws Exception {
public void testCtorWithNullClassLoaderArgumentAndNullMappingLocationArgument() {
new DefaultNamespaceHandlerResolver(null, null);
}

@Test
public void testCtorWithNonExistentMappingLocationArgument() throws Exception {
public void testCtorWithNonExistentMappingLocationArgument() {
// simply must not bail; we don't want non-existent resources to result in an Exception
new DefaultNamespaceHandlerResolver(null, "738trbc bobabloobop871");
}
Expand Down

0 comments on commit 7edf8ac

Please sign in to comment.