1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package com.github.maven_nar.cpptasks;
21
22 import java.io.File;
23 import java.io.IOException;
24
25 import javax.xml.parsers.ParserConfigurationException;
26
27 import org.xml.sax.SAXException;
28
29
30
31
32
33
34 public class TestDependencyTable extends TestXMLConsumer {
35
36
37
38
39
40
41 public TestDependencyTable(final String testName) {
42 super(testName);
43 }
44
45
46
47
48
49
50 public void testLoadOpenshore() throws IOException, ParserConfigurationException, SAXException {
51 final String tmpDir = System.getProperty("java.io.tmpdir");
52 try {
53 copyResourceToTmpDir("openshore/dependencies.xml", "dependencies.xml");
54 final DependencyTable dependencies = new DependencyTable(new File(tmpDir));
55 dependencies.load();
56 } finally {
57 deleteTmpFile("dependencies.xml");
58 }
59 }
60
61
62
63
64
65
66 public void testLoadXerces() throws IOException, ParserConfigurationException, SAXException {
67 final String tmpDir = System.getProperty("java.io.tmpdir");
68 try {
69 copyResourceToTmpDir("xerces-c/dependencies.xml", "dependencies.xml");
70 final DependencyTable dependencies = new DependencyTable(new File(tmpDir));
71 dependencies.load();
72 } finally {
73 deleteTmpFile("dependencies.xml");
74 }
75 }
76 }