aboutsummaryrefslogtreecommitdiff
path: root/test/uk/ac/ox/cs/pagoda/junit/AllTests.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/uk/ac/ox/cs/pagoda/junit/AllTests.java')
-rw-r--r--test/uk/ac/ox/cs/pagoda/junit/AllTests.java50
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 @@
1package uk.ac.ox.cs.pagoda.junit;
2
3import java.io.BufferedWriter;
4import java.io.FileInputStream;
5import java.io.FileNotFoundException;
6import java.io.FileOutputStream;
7import java.io.IOException;
8import java.io.InputStream;
9import java.io.OutputStream;
10import java.io.OutputStreamWriter;
11
12import org.junit.runner.RunWith;
13import org.junit.runners.Suite;
14import org.junit.runners.Suite.SuiteClasses;
15
16import uk.ac.ox.cs.data.WriteIntoTurtle;
17
18@RunWith(Suite.class)
19@SuiteClasses({ WriteIntoTurtle.class, PagodaUOBM.class
20 })
21public 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}