Methods Summary |
---|
private java.lang.String | readFile(java.io.File f)
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(f));
StringBuffer buf = new StringBuffer();
String line=null;
while((line=reader.readLine())!=null){
buf.append(line + EOL);
}
return buf.toString();
} finally {
if (reader != null) {
reader.close();
}
}
|
public void | setUp()
configureProject("src/etc/testcases/taskdefs/cvspass.xml");
|
public void | tearDown()
executeTarget("cleanup");
|
public void | testNoCVSRoot()
try{
executeTarget("test1");
fail("BuildException not thrown");
}catch(BuildException e){
assertEquals("cvsroot is required", e.getMessage());
}
|
public void | testNoPassword()
try{
executeTarget("test2");
fail("BuildException not thrown");
}catch(BuildException e){
assertEquals("password is required", e.getMessage());
}
|
public void | testPassFile()
executeTarget("test3");
File f = new File(getProjectDir(), "testpassfile.tmp");
assertTrue( "Passfile "+f+" not created", f.exists());
assertEquals(JAKARTA_URL+EOL, readFile(f));
|
public void | testPassFileDuplicateEntry()
executeTarget("test4");
File f = new File(getProjectDir(), "testpassfile.tmp");
assertTrue( "Passfile "+f+" not created", f.exists());
assertEquals(
JAKARTA_URL+ EOL+
TIGRIS_URL+ EOL,
readFile(f));
|
public void | testPassFileMultipleEntry()
executeTarget("test5");
File f = new File(getProjectDir(), "testpassfile.tmp");
assertTrue( "Passfile "+f+" not created", f.exists());
assertEquals(
JAKARTA_URL+ EOL+
XML_URL+ EOL+
TIGRIS_URL+ EOL,
readFile(f));
|