-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
src/test/java/emissary/test/core/junit5/TestingResourcesTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package emissary.test.core.junit5; | ||
|
||
import emissary.place.IServiceProviderPlace; | ||
import emissary.transform.HtmlEscapePlace; | ||
import emissary.transform.HtmlEscapePlaceTest; | ||
|
||
import org.junit.jupiter.params.provider.Arguments; | ||
|
||
import java.io.IOException; | ||
import java.util.stream.Stream; | ||
|
||
/** | ||
* Explicitly meant to test data and answer files from different directories. This test uses {@link HtmlEscapePlaceTest} | ||
* sample.dat with the sample.xml in {@link TestingResourcesTest} directory. | ||
*/ | ||
public class TestingResourcesTest extends ExtractionTest { | ||
|
||
public static Stream<? extends Arguments> data() { | ||
return getMyTestParameterFiles(HtmlEscapePlaceTest.class, TestingResourcesTest.class); | ||
} | ||
|
||
@Override | ||
public IServiceProviderPlace createPlace() throws IOException { | ||
return new HtmlEscapePlace(); | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
src/test/resources/emissary/test/core/junit5/TestingResourcesTest/sample.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<root> | ||
<setup> | ||
<initialForm>HTML</initialForm> | ||
<fontEncoding>UTF8</fontEncoding> | ||
</setup> | ||
|
||
<answers> | ||
<numAttachments>0</numAttachments> | ||
<currentForm>HTML</currentForm> | ||
<fileType>HTML</fileType> | ||
<currentFormSize>1</currentFormSize> | ||
<fontEncoding>UTF8</fontEncoding> | ||
|
||
<meta> | ||
<name>CHARACTER_DIGIT_HTML_ESCAPE</name> | ||
<value>7</value> | ||
</meta> | ||
|
||
<meta> | ||
<name>CHARACTER_PUNCTUATION_HTML_ESCAPE</name> | ||
<value>4</value> | ||
</meta> | ||
|
||
<meta> | ||
<name>CHARACTER_BLANK_SPACE_HTML_ESCAPE</name> | ||
<value>3</value> | ||
</meta> | ||
|
||
<data matchMode="index"> | ||
<value>٠١٢٣٤٥</value> | ||
</data> | ||
|
||
<data matchMode="index"> | ||
<value>This Is A Test</value> | ||
</data> | ||
|
||
<data matchMode="contains"> | ||
<value>This Is A Test</value> | ||
</data> | ||
|
||
<data matchMode="index"> | ||
<value>You can have it one way && Not the other way, || both ways</value> | ||
</data> | ||
|
||
</answers> | ||
</root> |