diff options
| author | yzhou <yujiao.zhou@gmail.com> | 2015-04-21 10:34:27 +0100 |
|---|---|---|
| committer | yzhou <yujiao.zhou@gmail.com> | 2015-04-21 10:34:27 +0100 |
| commit | 9ce65c5a963b03ee97fe9cb6c5aa65a3c04a80a8 (patch) | |
| tree | 47511c0fb89dccff0db4b5990522e04f294d795b /test/uk/ac/ox/cs/pagoda/junit/AllTests.java | |
| parent | b1ac207612ee8b045244253fb94b866104bc34f2 (diff) | |
| download | ACQuA-9ce65c5a963b03ee97fe9cb6c5aa65a3c04a80a8.tar.gz ACQuA-9ce65c5a963b03ee97fe9cb6c5aa65a3c04a80a8.zip | |
initial version
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/junit/AllTests.java')
| -rw-r--r-- | test/uk/ac/ox/cs/pagoda/junit/AllTests.java | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/test/uk/ac/ox/cs/pagoda/junit/AllTests.java b/test/uk/ac/ox/cs/pagoda/junit/AllTests.java new file mode 100644 index 0000000..6884081 --- /dev/null +++ b/test/uk/ac/ox/cs/pagoda/junit/AllTests.java | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | package uk.ac.ox.cs.pagoda.junit; | ||
| 2 | |||
| 3 | import java.io.BufferedWriter; | ||
| 4 | import java.io.FileInputStream; | ||
| 5 | import java.io.FileNotFoundException; | ||
| 6 | import java.io.FileOutputStream; | ||
| 7 | import java.io.IOException; | ||
| 8 | import java.io.InputStream; | ||
| 9 | import java.io.OutputStream; | ||
| 10 | import java.io.OutputStreamWriter; | ||
| 11 | |||
| 12 | import org.junit.runner.RunWith; | ||
| 13 | import org.junit.runners.Suite; | ||
| 14 | import org.junit.runners.Suite.SuiteClasses; | ||
| 15 | |||
| 16 | import uk.ac.ox.cs.data.WriteIntoTurtle; | ||
| 17 | |||
| 18 | @RunWith(Suite.class) | ||
| 19 | @SuiteClasses({ WriteIntoTurtle.class, PagodaUOBM.class | ||
| 20 | }) | ||
| 21 | public class AllTests { | ||
| 22 | |||
| 23 | public static void copy(String source, String dest) { | ||
| 24 | InputStream is = null; | ||
| 25 | OutputStream os = null; | ||
| 26 | try { | ||
| 27 | is = new FileInputStream(source); | ||
| 28 | os = new FileOutputStream(dest); | ||
| 29 | byte[] buffer = new byte[1024]; | ||
| 30 | int length; | ||
| 31 | while ((length = is.read(buffer)) > 0) { | ||
| 32 | os.write(buffer, 0, length); | ||
| 33 | } | ||
| 34 | is.close(); | ||
| 35 | os.close(); | ||
| 36 | |||
| 37 | BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(source))); | ||
| 38 | writer.write(""); | ||
| 39 | writer.close(); | ||
| 40 | } catch (FileNotFoundException e) { | ||
| 41 | e.printStackTrace(); | ||
| 42 | } catch (IOException e) { | ||
| 43 | e.printStackTrace(); | ||
| 44 | } | ||
| 45 | |||
| 46 | // File src = new File(source); | ||
| 47 | // src.delete(); | ||
| 48 | } | ||
| 49 | |||
| 50 | } | ||
