DefaultExcludesTestpublic class DefaultExcludesTest extends org.apache.tools.ant.BuildFileTest
Constructors Summary |
---|
public DefaultExcludesTest(String name)
super(name);
|
Methods Summary |
---|
private void | assertEquals(java.lang.String message, java.lang.String[] expected, java.lang.String[] actual)
// check that both arrays have the same size
assertEquals(message + " : string array length match", expected.length, actual.length);
for (int counter=0; counter <expected.length; counter++) {
assertEquals(message + " : " + counter + "th element in array match", expected[counter], actual[counter]);
}
| public void | setUp()
configureProject("src/etc/testcases/taskdefs/defaultexcludes.xml");
| public void | tearDown()
project.executeTarget("cleanup");
| public void | test1()
String[] expected = {
"**/*~",
"**/#*#",
"**/.#*",
"**/%*%",
"**/._*",
"**/CVS",
"**/CVS/**",
"**/.cvsignore",
"**/SCCS",
"**/SCCS/**",
"**/vssver.scc",
"**/.svn",
"**/.svn/**",
"**/.DS_Store"};
project.executeTarget("test1");
assertEquals("current default excludes", expected, DirectoryScanner.getDefaultExcludes());
| public void | test2()
String[] expected = {
"**/*~",
"**/#*#",
"**/.#*",
"**/%*%",
"**/._*",
"**/CVS",
"**/CVS/**",
"**/.cvsignore",
"**/SCCS",
"**/SCCS/**",
"**/vssver.scc",
"**/.svn",
"**/.svn/**",
"**/.DS_Store",
"foo"};
project.executeTarget("test2");
assertEquals("current default excludes", expected, DirectoryScanner.getDefaultExcludes());
| public void | test3()
String[] expected = {
"**/*~",
"**/#*#",
"**/.#*",
"**/%*%",
"**/._*",
//CVS missing
"**/CVS/**",
"**/.cvsignore",
"**/SCCS",
"**/SCCS/**",
"**/vssver.scc",
"**/.svn",
"**/.svn/**",
"**/.DS_Store"};
project.executeTarget("test3");
assertEquals("current default excludes", expected, DirectoryScanner.getDefaultExcludes());
|
|