A test automation library based on common other best practice open source libraries. It adds missing functionalities but does not reinvent the wheel. Just glues stuff together nicely and adds some sprinkles.
Current solution:
Add a file to a List in NeodymiumTest and the inherited @AfterClass method will delete them after the test.
// create a file
File file = new File(PATH);
// add it to the list
NeodymiumTest.tempFiles.add(file);
// this function will take care of the rest
@AfterClass
public static void cleanUp()
{
for (File tempFile : tempFiles)
{
deleteTempFile(tempFile);
}
}
An alternative solution could be to use the appropriate interface of File
File tempConfigFile = new File(PATH);
tempConfigFile.deleteOnExit();
// interact with the file
writeMapToPropertiesFile(properties, tempConfigFile);
Please validate this approach and remove the old approach and all unused functions if this works as expected.
Current solution: Add a file to a List in
NeodymiumTest
and the inherited@AfterClass
method will delete them after the test.An alternative solution could be to use the appropriate interface of File
Please validate this approach and remove the old approach and all unused functions if this works as expected.