Skip to content

Commit 8eb8327

Browse files
jirka.pinkas@gmail.comjirka.pinkas@gmail.com
authored andcommitted
cleanup - moved XSDs used in tests to src/test/resources
1 parent 17039ef commit 8eb8327

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/test/java/cz/jiripinkas/jsitemapgenerator/generator/RssGeneratorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public void testConstructRssEmptyItemsShouldThrowException() {
2929
try {
3030
String rss = rssGenerator.toString();
3131
ByteArrayInputStream xml = new ByteArrayInputStream(rss.getBytes(StandardCharsets.UTF_8));
32-
TestUtil.testSitemapXsd(xml, new File("rss20.xsd"));
32+
TestUtil.testSitemapXsd(xml, new File("src/test/resources/rss20.xsd"));
3333
} catch (Exception e) {
3434
assertEquals("cvc-complex-type.2.4.b: The content of element 'channel' is not complete. One of '{image, textInput, skipHours, skipDays, item}' is expected.", e.getMessage());
3535
}
@@ -46,7 +46,7 @@ public void testConstructRssWithItems() throws SAXException, IOException {
4646
);
4747
String rss = rssGenerator.toString();
4848
ByteArrayInputStream xml = new ByteArrayInputStream(rss.getBytes(StandardCharsets.UTF_8));
49-
TestUtil.testSitemapXsd(xml, new File("rss20.xsd"));
49+
TestUtil.testSitemapXsd(xml, new File("src/test/resources/rss20.xsd"));
5050
}
5151

5252
@Test

src/test/java/cz/jiripinkas/jsitemapgenerator/generator/SitemapGeneratorTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void testConstructAlternateUrls2() {
109109
public void testConstructSitemap() throws Exception {
110110
String sitemap = sitemapGenerator.toString();
111111
ByteArrayInputStream sitemapXml = new ByteArrayInputStream(sitemap.getBytes(StandardCharsets.UTF_8));
112-
TestUtil.testSitemapXsd(sitemapXml, new File("sitemap.xsd"));
112+
TestUtil.testSitemapXsd(sitemapXml, new File("src/test/resources/sitemap.xsd"));
113113
}
114114

115115
@Test
@@ -134,7 +134,7 @@ public void testSaveSitemap() throws Exception {
134134
"</urlset>";
135135
assertEquals(expectedSitemap, actualSitemap);
136136
try {
137-
TestUtil.testSitemapXsdFile(tmpFile, new File("sitemap.xsd"));
137+
TestUtil.testSitemapXsdFile(tmpFile, new File("src/test/resources/sitemap.xsd"));
138138
} finally {
139139
tmpFile.delete();
140140
}
@@ -145,7 +145,7 @@ public void testConstructAndSaveSitemap() throws Exception {
145145
File tmpFile = File.createTempFile("test", "sitemap");
146146
sitemapGenerator.toFile(tmpFile);
147147
try {
148-
TestUtil.testSitemapXsdFile(tmpFile, new File("sitemap.xsd"));
148+
TestUtil.testSitemapXsdFile(tmpFile, new File("src/test/resources/sitemap.xsd"));
149149
} finally {
150150
tmpFile.delete();
151151
}

src/test/java/cz/jiripinkas/jsitemapgenerator/generator/SitemapIndexGeneratorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ public void testConstructUrl() {
3434
public void testConstructSitemapIndex() throws SAXException, IOException {
3535
String sitemapIndex = sitemapIndexGenerator.toString();
3636
ByteArrayInputStream sitemapXml = new ByteArrayInputStream(sitemapIndex.getBytes("UTF-8"));
37-
TestUtil.testSitemapXsd(sitemapXml, new File("siteindex.xsd"));
37+
TestUtil.testSitemapXsd(sitemapXml, new File("src/test/resources/siteindex.xsd"));
3838
}
3939

4040
@Test
4141
public void testConstructAndSaveSitemap() throws SAXException, IOException {
4242
File tmpFile = File.createTempFile("test", "sitemap");
4343
sitemapIndexGenerator.toFile(tmpFile);
4444
try {
45-
TestUtil.testSitemapXsdFile(tmpFile, new File("siteindex.xsd"));
45+
TestUtil.testSitemapXsdFile(tmpFile, new File("src/test/resources/siteindex.xsd"));
4646
} finally {
4747
tmpFile.delete();
4848
}
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)