blob: 943583ae42b63f90eaa7123333061ca8c1165ae9 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.testrunner;
import org.junit.Test;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
import static org.junit.Assert.assertEquals;
/**
* @author valerijf
*/
public class PomXmlGeneratorTest {
@Test
public void write_system_tests_pom_xml() throws IOException {
List<Path> artifacts = Arrays.asList(
Paths.get("components/my-comp.jar"),
Paths.get("main.jar"));
String actual = PomXmlGenerator.generatePomXml(TestProfile.SYSTEM_TEST, artifacts, artifacts.get(1));
assertFile("/pom.xml_system_tests", actual);
}
private void assertFile(String resourceFile, String actual) throws IOException {
String expected = new String(this.getClass().getResourceAsStream(resourceFile).readAllBytes());
assertEquals(resourceFile, expected, actual);
}
}
|