diff --git a/src/tests/com/puppycrawl/tools/checkstyle/AvoidStarImportTest.java b/src/tests/com/puppycrawl/tools/checkstyle/AvoidStarImportTest.java index 9758b591b..e1f92bc4c 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/AvoidStarImportTest.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/AvoidStarImportTest.java @@ -8,8 +8,9 @@ public class AvoidStarImportTest public void testWithChecker() throws Exception { - final CheckConfiguration checkConfig = new CheckConfiguration(); - checkConfig.setClassname(AvoidStarImport.class.getName()); + final DefaultConfiguration checkConfig = + new DefaultConfiguration("test"); + checkConfig.addAttribute("classname", AvoidStarImport.class.getName()); final Checker c = createChecker(checkConfig); final String fname = getPath("InputImport.java"); final String[] expected = { diff --git a/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java b/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java index 13d0d7989..d43636244 100644 --- a/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java +++ b/src/tests/com/puppycrawl/tools/checkstyle/BaseCheckTestCase.java @@ -1,5 +1,6 @@ package com.puppycrawl.tools.checkstyle; +import com.puppycrawl.tools.checkstyle.api.Configuration; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.File; @@ -32,14 +33,16 @@ public abstract class BaseCheckTestCase protected final PrintStream mStream = new PrintStream(mBAOS); protected final Properties mProps = new Properties(); - protected Checker createChecker(CheckConfiguration aCheckConfig) + protected Checker createChecker(Configuration aConfig) throws Exception { - final Checker c = new Checker(new GlobalProperties(mProps, mStream), - new CheckConfiguration[] {aCheckConfig}); - final AuditListener listener = new BriefLogger(mStream); - c.addListener(listener); - return c; + throw new IllegalStateException("not implemented yet"); +// final DefaultConfiguration dc = new DefaultConfiguration("root"); +// dc.addChild(aConfig); +// final Checker c = new Checker(); +// c.configure(aConfig); +// c.addListener(new BriefLogger(mStream)); +// return c; } protected static String getPath(String aFilename)