Skip to content

Commit

Permalink
Issue checkstyle#4686: Moved input of 'flawless' subdirectory to 'che…
Browse files Browse the repository at this point in the history
…ckstyleanttask' subdirectory of CheckstyleAntTaskTest
  • Loading branch information
subkrish authored and romani committed Jul 12, 2017
1 parent 3694f89 commit 689790e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Expand Up @@ -72,9 +72,8 @@
@PrepareForTest({CheckstyleAntTask.class, Closeables.class})
public class CheckstyleAntTaskTest extends BaseCheckTestSupport {

private static final String FLAWLESS_INPUT_DIR = "ant/checkstyleanttask/flawless/";
private static final String FLAWLESS_INPUT =
FLAWLESS_INPUT_DIR + "InputCheckstyleAntTaskFlawless.java";
"/ant/checkstyleanttask/InputCheckstyleAntTaskFlawless.java";
private static final String VIOLATED_INPUT =
"ant/checkstyleanttask/InputCheckstyleAntTaskError.java";
private static final String WARNING_INPUT =
Expand Down Expand Up @@ -182,7 +181,7 @@ public final void testPathsDirectoryWithNestedFile() throws IOException {
antTask.setProject(new Project());

final FileResource fileResource = new FileResource(
antTask.getProject(), getPath(FLAWLESS_INPUT_DIR));
antTask.getProject(), getPath("ant/checkstyleanttask/"));
final Path sourcePath = new Path(antTask.getProject());
sourcePath.add(fileResource);
antTask.addPath(sourcePath);
Expand All @@ -195,9 +194,9 @@ public final void testPathsDirectoryWithNestedFile() throws IOException {
TestRootModuleChecker.isProcessed());
final List<File> filesToCheck = TestRootModuleChecker.getFilesToCheck();
assertThat("There more files to check then expected",
filesToCheck.size(), is(1));
filesToCheck.size(), is(9));
assertThat("The path of file differs from expected",
filesToCheck.get(0).getAbsolutePath(), is(getPath(FLAWLESS_INPUT)));
filesToCheck.get(5).getAbsolutePath(), is(getPath(FLAWLESS_INPUT)));
assertEquals("Amount of logged messages in unxexpected",
9, antTask.getLoggedMessages().size());
}
Expand Down
@@ -1,4 +1,4 @@
package com.puppycrawl.tools.checkstyle.ant.checkstyleanttask.flawless;
package com.puppycrawl.tools.checkstyle.ant.checkstyleanttask;

public final class InputCheckstyleAntTaskFlawless {
private String foo = "A short line";
Expand Down

0 comments on commit 689790e

Please sign in to comment.