Finally. The tests compile, now to make them run, then pass.

This commit is contained in:
Oliver Burn 2002-12-01 05:27:33 +00:00
parent 5ace8fc09d
commit fbbaff4827
1 changed files with 22 additions and 26 deletions

View File

@ -1,38 +1,34 @@
package com.puppycrawl.tools.checkstyle;
import com.puppycrawl.tools.checkstyle.api.FileSetCheck;
import com.puppycrawl.tools.checkstyle.checks.PackageHtmlCheck;
public class PackageHtmlCheckTest
extends BaseCheckTestCase
{
protected Checker createChecker(CheckConfiguration aCheckConfig)
throws Exception
{
final Checker c = new Checker(new GlobalProperties(mProps, mStream),
new CheckConfiguration[0]);
final AuditListener listener = new BriefLogger(mStream);
c.addListener(listener);
return c;
}
// protected Checker createChecker(CheckConfiguration aCheckConfig)
// throws Exception
// {
// final Checker c = new Checker(new GlobalProperties(mProps, mStream),
// new CheckConfiguration[0]);
// final AuditListener listener = new BriefLogger(mStream);
// c.addListener(listener);
// return c;
// }
public void testPackageHtml()
throws Exception
{
CheckConfiguration checkConfig = new CheckConfiguration();
// no Checks in config, but register new PackageHtml as a FileSetCheck
Checker c = createChecker(checkConfig);
final FileSetCheck fsc = new PackageHtmlCheck();
c.addFileSetCheck(fsc);
final String packageHtmlPath = getPath("package.html");
final String filepath = getPath("InputScopeAnonInner.java");
final String[] expected = {
"0: Missing package documentation file.",
};
verify(c, filepath, packageHtmlPath, expected);
// CheckConfiguration checkConfig = new CheckConfiguration();
// // no Checks in config, but register new PackageHtml as a FileSetCheck
// Checker c = createChecker(checkConfig);
// final FileSetCheck fsc = new PackageHtmlCheck();
// c.addFileSetCheck(fsc);
//
// final String packageHtmlPath = getPath("package.html");
// final String filepath = getPath("InputScopeAnonInner.java");
//
// final String[] expected = {
// "0: Missing package documentation file.",
// };
// verify(c, filepath, packageHtmlPath, expected);
}
}