| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package func; |
| 18 |
|
| 19 |
import java.io.File; |
| 20 |
import java.io.FileNotFoundException; |
| 21 |
|
| 22 |
import uk.me.parabola.imgfmt.fs.FileSystem; |
| 23 |
import uk.me.parabola.imgfmt.sys.ImgFS; |
| 24 |
|
| 25 |
import func.lib.Args; |
| 26 |
import func.lib.TestUtils; |
| 27 |
import org.junit.After; |
| 28 |
import org.junit.Before; |
| 29 |
|
| 30 |
import static org.junit.Assert.*; |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
public class Base { |
| 39 |
@Before |
| 40 |
public void baseSetup() { |
| 41 |
TestUtils.deleteOutputFiles(); |
| 42 |
} |
| 43 |
|
| 44 |
@After |
| 45 |
public void baseTeardown() { |
| 46 |
TestUtils.closeFiles(); |
| 47 |
} |
| 48 |
|
| 49 |
protected void checkStdFile() { |
| 50 |
assertTrue("std output file exists", new File(Args.DEF_MAP_FILENAME).exists()); |
| 51 |
} |
| 52 |
|
| 53 |
protected void checkNoStdFile() { |
| 54 |
assertFalse("std output file exists", new File(Args.DEF_MAP_FILENAME).exists()); |
| 55 |
} |
| 56 |
|
| 57 |
protected FileSystem openFs(String filename) throws FileNotFoundException { |
| 58 |
FileSystem fs = ImgFS.openFs(filename); |
| 59 |
TestUtils.registerFile(fs); |
| 60 |
return fs; |
| 61 |
} |
| 62 |
} |