mirror of https://github.com/apache/poi.git
[github-260] add test case
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1893991 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ce05cc8dda
commit
4ec60ae992
|
@ -66,13 +66,14 @@ class TestXDGFVisioExtractor {
|
|||
//some common visio classes -- ConnectsType
|
||||
@Test
|
||||
void testVisioConnects() throws IOException {
|
||||
InputStream is = SAMPLES.openResourceAsStream("60489.vsdx");
|
||||
XmlVisioDocument document = new XmlVisioDocument(is);
|
||||
is.close();
|
||||
XDGFVisioExtractor extractor = new XDGFVisioExtractor(document);
|
||||
String text = extractor.getText();
|
||||
assertContains(text, "Arrears");
|
||||
extractor.close();
|
||||
XmlVisioDocument document;
|
||||
try (InputStream is = SAMPLES.openResourceAsStream("60489.vsdx")) {
|
||||
document = new XmlVisioDocument(is);
|
||||
}
|
||||
try (XDGFVisioExtractor extractor = new XDGFVisioExtractor(document)) {
|
||||
String text = extractor.getText();
|
||||
assertContains(text, "Arrears");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -84,13 +85,26 @@ class TestXDGFVisioExtractor {
|
|||
*/
|
||||
@Test
|
||||
void testPolylineTo() throws IOException {
|
||||
InputStream is = SAMPLES.openResourceAsStream("60973.vsdx");
|
||||
XmlVisioDocument document = new XmlVisioDocument(is);
|
||||
is.close();
|
||||
XDGFVisioExtractor extractor = new XDGFVisioExtractor(document);
|
||||
String text = extractor.getText();
|
||||
assertContains(text, "42 U");
|
||||
assertContains(text, "Access VLANS");
|
||||
extractor.close();
|
||||
XmlVisioDocument document;
|
||||
try (InputStream is = SAMPLES.openResourceAsStream("60973.vsdx")) {
|
||||
document = new XmlVisioDocument(is);
|
||||
}
|
||||
try (XDGFVisioExtractor extractor = new XDGFVisioExtractor(document)) {
|
||||
String text = extractor.getText();
|
||||
assertContains(text, "42 U");
|
||||
assertContains(text, "Access VLANS");
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
void testGithub260() throws IOException {
|
||||
XmlVisioDocument document;
|
||||
try (InputStream is = SAMPLES.openResourceAsStream("github260.vsdx")) {
|
||||
document = new XmlVisioDocument(is);
|
||||
}
|
||||
try (XDGFVisioExtractor extractor = new XDGFVisioExtractor(document)) {
|
||||
String text = extractor.getText();
|
||||
assertContains(text, "Arrive at hotel");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue