import org.testng.Assert;
import org.testng.annotations.AfterClass;
+import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
import jalview.gui.AlignFrame;
import jalview.gui.JvOptionPane;
+@Test(singleThreaded = true)
public class BackupFilesTest
{
@BeforeClass(alwaysRun = true)
// check no backup files
File[] backupFiles = getBackupFiles();
- Assert.assertTrue(backupFiles.length == 0);
+ Assert.assertEquals(backupFiles.length, 0, "Number of backup files is "
+ + backupFiles.length + ", not " + 0);
}
// save with no numbers in the backup file names
}
// this deletes the newFile (if it exists) and any saved backup file for it
+ @AfterTest(alwaysRun = true)
@AfterClass(alwaysRun = true)
private void cleanupTmpFiles()
{
newfile.delete();
}
File[] tmpFiles = getBackupFiles(file, mysuffix, mydigits);
+ boolean a = true;
for (int i = 0; i < tmpFiles.length; i++)
{
if (actuallyDeleteTmpFiles)