|
Lines 45-76
Link Here
|
| 45 |
} |
45 |
} |
| 46 |
} |
46 |
} |
| 47 |
|
47 |
|
| 48 |
public void testGetActualLocation1() throws URISyntaxException { |
48 |
public void testGetActualLocation1() throws Exception { |
| 49 |
URI base = new URI("http://localhost/artifactRepository"); |
49 |
URI base = new URI("http://localhost/artifactRepository"); |
| 50 |
assertEquals(new URI(base + "/artifacts.xml"), SimpleArtifactRepository.getActualLocation(base, false)); |
50 |
assertEquals(new URI(base + "/artifacts.xml"), SimpleArtifactRepository.getActualLocation(base, false)); |
| 51 |
} |
51 |
} |
| 52 |
|
52 |
|
| 53 |
public void testGetActualLocation2() throws URISyntaxException { |
53 |
public void testGetActualLocation2() throws Exception { |
| 54 |
URI base = new URI("http://localhost/artifactRepository/"); |
54 |
URI base = new URI("http://localhost/artifactRepository/"); |
| 55 |
assertEquals(new URI(base + "artifacts.xml"), SimpleArtifactRepository.getActualLocation(base, false)); |
55 |
assertEquals(new URI(base + "artifacts.xml"), SimpleArtifactRepository.getActualLocation(base, false)); |
| 56 |
} |
56 |
} |
| 57 |
|
57 |
|
| 58 |
public void testGetActualLocation3() throws URISyntaxException { |
58 |
public void testGetActualLocation3() throws Exception { |
| 59 |
URI base = new URI("http://localhost/artifactRepository/artifacts.xml"); |
59 |
URI base = new URI("http://localhost/artifactRepository/artifacts.xml"); |
| 60 |
assertEquals(base, SimpleArtifactRepository.getActualLocation(base, false)); |
60 |
assertEquals(base, SimpleArtifactRepository.getActualLocation(base, false)); |
| 61 |
} |
61 |
} |
| 62 |
|
62 |
|
| 63 |
public void testGetActualLocationCompressed1() throws URISyntaxException { |
63 |
public void testGetActualLocationCompressed1() throws Exception { |
| 64 |
URI base = new URI("http://localhost/artifactRepository"); |
64 |
URI base = new URI("http://localhost/artifactRepository"); |
| 65 |
assertEquals(new URI(base + "/artifacts.jar"), SimpleArtifactRepository.getActualLocation(base, true)); |
65 |
assertEquals(new URI(base + "/artifacts.jar"), SimpleArtifactRepository.getActualLocation(base, true)); |
| 66 |
} |
66 |
} |
| 67 |
|
67 |
|
| 68 |
public void testGetActualLocationCompressed2() throws URISyntaxException { |
68 |
public void testGetActualLocationCompressed2() throws Exception { |
| 69 |
URI base = new URI("http://localhost/artifactRepository/"); |
69 |
URI base = new URI("http://localhost/artifactRepository/"); |
| 70 |
assertEquals(new URI(base + "artifacts.jar"), SimpleArtifactRepository.getActualLocation(base, true)); |
70 |
assertEquals(new URI(base + "artifacts.jar"), SimpleArtifactRepository.getActualLocation(base, true)); |
| 71 |
} |
71 |
} |
| 72 |
|
72 |
|
| 73 |
public void testGetActualLocationCompressed3() throws URISyntaxException { |
73 |
public void testGetActualLocationCompressed3() throws Exception { |
| 74 |
URI base = new URI("http://localhost/artifactRepository/artifacts.jar"); |
74 |
URI base = new URI("http://localhost/artifactRepository/artifacts.jar"); |
| 75 |
assertEquals(base, SimpleArtifactRepository.getActualLocation(base, true)); |
75 |
assertEquals(base, SimpleArtifactRepository.getActualLocation(base, true)); |
| 76 |
} |
76 |
} |
|
Lines 141-146
Link Here
|
| 141 |
fail("Repository should create artifact.xml"); |
141 |
fail("Repository should create artifact.xml"); |
| 142 |
} |
142 |
} |
| 143 |
|
143 |
|
|
|
144 |
public void testLoadInvalidLocation() { |
| 145 |
try { |
| 146 |
getArtifactRepositoryManager().loadRepository(new URI("file:d:/foo"), getMonitor()); |
| 147 |
} catch (ProvisionException e) { |
| 148 |
//expected |
| 149 |
} catch (URISyntaxException e) { |
| 150 |
fail("4.99", e); |
| 151 |
} |
| 152 |
} |
| 153 |
|
| 144 |
public void test_248772() { |
154 |
public void test_248772() { |
| 145 |
SimpleArtifactRepositoryFactory factory = new SimpleArtifactRepositoryFactory(); |
155 |
SimpleArtifactRepositoryFactory factory = new SimpleArtifactRepositoryFactory(); |
| 146 |
URI location = null; |
156 |
URI location = null; |