April 05
Prof. Ismael H. F. Santos -  ismael@tecgraf.puc-rio.br                                                          2
Example:  Using a file as a text fixture
npublic class OutputTest
n{
n    private File output;
n
n    @Before public void createOutputFile()
n    {
n       output = new File(...);
n    }
n
n    @After public void deleteOutputFile()
n    {
n        output.delete();
n    }
n   
n    @Test public void test1WithFile()
n    {
n       // code for test case objective
n    }
n
n @Test public void test2WithFile()
n    {
n       // code for test case objective
n    }
n}