From 28c7bfc4e738ec84eefb3ce475fe9e6612e3ef27 Mon Sep 17 00:00:00 2001 From: Mark Fisher Date: Sun, 21 Sep 2008 22:37:11 +0000 Subject: [PATCH] Adjusted expected exception (now IllegalArgumentException). --- .../file/RegexPatternFilenameFilterTests.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/org.springframework.integration.adapter/src/test/java/org/springframework/integration/adapter/file/RegexPatternFilenameFilterTests.java b/org.springframework.integration.adapter/src/test/java/org/springframework/integration/adapter/file/RegexPatternFilenameFilterTests.java index 28368f9a0f..96be95ea8b 100644 --- a/org.springframework.integration.adapter/src/test/java/org/springframework/integration/adapter/file/RegexPatternFilenameFilterTests.java +++ b/org.springframework.integration.adapter/src/test/java/org/springframework/integration/adapter/file/RegexPatternFilenameFilterTests.java @@ -30,7 +30,6 @@ import org.junit.Test; import org.springframework.beans.TypeMismatchException; import org.springframework.beans.factory.BeanCreationException; import org.springframework.context.support.ClassPathXmlApplicationContext; -import org.springframework.integration.ConfigurationException; /** * @author Mark Fisher @@ -38,7 +37,7 @@ import org.springframework.integration.ConfigurationException; public class RegexPatternFilenameFilterTests { @Test - public void testMatch() { + public void match() { File file = new File("/some/path/test.txt"); RegexPatternFilenameFilter filter = new RegexPatternFilenameFilter(); filter.setPattern(Pattern.compile("[a-z]+\\.txt")); @@ -46,22 +45,22 @@ public class RegexPatternFilenameFilterTests { } @Test - public void testNoMatch() { + public void noMatch() { File file = new File("/some/path/Test.txt"); RegexPatternFilenameFilter filter = new RegexPatternFilenameFilter(); filter.setPattern(Pattern.compile("[a-z]+\\.txt")); assertFalse(filter.accept(file.getParentFile(), file.getName())); } - @Test(expected=ConfigurationException.class) - public void testPatternNotSet() { + @Test(expected = IllegalArgumentException.class) + public void patternNotSet() { File file = new File("/some/path/test.txt"); RegexPatternFilenameFilter filter = new RegexPatternFilenameFilter(); filter.accept(file.getParentFile(), file.getName()); } @Test - public void testPatternEditorInContext() { + public void patternEditorInContext() { ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext( "regexPatternFilenameFilterTests.xml", this.getClass()); FilenameFilter filter = (FilenameFilter) context.getBean("filter"); @@ -70,7 +69,7 @@ public class RegexPatternFilenameFilterTests { } @Test - public void testInvalidPatternSyntax() { + public void invalidPatternSyntax() { try { new ClassPathXmlApplicationContext("invalidRegexPatternFilenameFilterTests.xml", this.getClass()); throw new IllegalStateException("context creation should have failed");