fix broken tests
This commit is contained in:
parent
9c74556770
commit
d49488c617
|
@ -50,7 +50,7 @@ public class CompareUtilitiesTests implements ResourceLoaderTests {
|
||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@MethodSource("getCompareXMLParams")
|
@MethodSource("getCompareXMLParams")
|
||||||
public void testCompareXML(String id, String expectedFileName, String actualFileName, String expectedOutputFileName) throws Exception {
|
public void testCompareXML(String expectedFileName, String actualFileName, String expectedOutputFileName) throws Exception {
|
||||||
final String expectedXMLPath = ROOT_XML_TEST_PATH.resolve(expectedFileName).toString();
|
final String expectedXMLPath = ROOT_XML_TEST_PATH.resolve(expectedFileName).toString();
|
||||||
final String actualXMLPath = ROOT_XML_TEST_PATH.resolve(actualFileName).toString();
|
final String actualXMLPath = ROOT_XML_TEST_PATH.resolve(actualFileName).toString();
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ public class CompareUtilitiesTests implements ResourceLoaderTests {
|
||||||
InputStream expectedXMLStream = classLoader.getResourceAsStream(expectedXMLPath);
|
InputStream expectedXMLStream = classLoader.getResourceAsStream(expectedXMLPath);
|
||||||
InputStream actualXMLStream = classLoader.getResourceAsStream(actualXMLPath);
|
InputStream actualXMLStream = classLoader.getResourceAsStream(actualXMLPath);
|
||||||
|
|
||||||
final String actualOutput = CompareUtilities.checkXMLIsSame(id, expectedXMLStream, actualXMLStream);
|
final String actualOutput = CompareUtilities.checkXMLIsSame(expectedFileName, expectedXMLStream, actualXMLStream);
|
||||||
|
|
||||||
if (expectedOutputFileName == null) {
|
if (expectedOutputFileName == null) {
|
||||||
assertNull(actualOutput);
|
assertNull(actualOutput);
|
||||||
|
@ -87,11 +87,11 @@ public class CompareUtilitiesTests implements ResourceLoaderTests {
|
||||||
|
|
||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@MethodSource("getCompareJSONParams")
|
@MethodSource("getCompareJSONParams")
|
||||||
public void testCompareJSON(String id, String expectedFileName, String actualFileName, String expectedOutputFileName) throws IOException {
|
public void testCompareJSON(String expectedFileName, String actualFileName, String expectedOutputFileName) throws IOException {
|
||||||
final String expectedJSONPath = ROOT_JSON_TEST_PATH.resolve(expectedFileName).toString();
|
final String expectedJSONPath = ROOT_JSON_TEST_PATH.resolve(expectedFileName).toString();
|
||||||
final String actualJSONPath = ROOT_JSON_TEST_PATH.resolve(actualFileName).toString();
|
final String actualJSONPath = ROOT_JSON_TEST_PATH.resolve(actualFileName).toString();
|
||||||
|
|
||||||
final String actualOutput = CompareUtilities.checkJsonSrcIsSame(id, getResourceAsString(expectedJSONPath), getResourceAsString(actualJSONPath), false, null);
|
final String actualOutput = CompareUtilities.checkJsonSrcIsSame(expectedFileName, getResourceAsString(expectedJSONPath), getResourceAsString(actualJSONPath), false, null);
|
||||||
if (expectedOutputFileName == null) {
|
if (expectedOutputFileName == null) {
|
||||||
assertNull(actualOutput);
|
assertNull(actualOutput);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
string property values differ at .expectedArray[0]
|
string property values differ at .expectedArray[0]
|
||||||
Expected :"expectedValue 1"
|
Expected:"expectedValue 1" for expected.json
|
||||||
Actual :"unexpectedValue 1"
|
Actual :"unexpectedValue 1"
|
|
@ -1,3 +1,3 @@
|
||||||
array item count differs at .expectedArray
|
array item count differs at .expectedArray
|
||||||
Expected :"2"
|
Expected:"2" for expected.json
|
||||||
Actual :"1"
|
Actual :"1"
|
|
@ -1,3 +1,3 @@
|
||||||
boolean property values differ at .expectedBoolean
|
boolean property values differ at .expectedBoolean
|
||||||
Expected :"true"
|
Expected:"true" for expected.json
|
||||||
Actual :"false"
|
Actual :"false"
|
|
@ -1,3 +1,3 @@
|
||||||
number property values differ at .expectedNumber
|
number property values differ at .expectedNumber
|
||||||
Expected :"123"
|
Expected:"123" for expected.json
|
||||||
Actual :"789"
|
Actual :"789"
|
|
@ -1,3 +1,3 @@
|
||||||
property types differ at .expectedString
|
property types differ at .expectedString
|
||||||
Expected :"expected value"
|
Expected:"expected value" for expected.json
|
||||||
Actual :"1"
|
Actual :"1"
|
|
@ -1,3 +1,3 @@
|
||||||
string property values differ at .expectedString
|
string property values differ at .expectedString
|
||||||
Expected :"expected value"
|
Expected:"expected value" for expected.json
|
||||||
Actual :"unexpected value"
|
Actual :"unexpected value"
|
|
@ -1,3 +1,3 @@
|
||||||
Attributes differ at /root/blah
|
Attributes differ at /root/blah
|
||||||
Expected :"dummyAtt"
|
Expected:"dummyAtt" for expected.xml
|
||||||
Actual :"wrongwrongwrong"
|
Actual :"wrongwrongwrong"
|
|
@ -1,3 +1,3 @@
|
||||||
Names differ at /root
|
Names differ at /root
|
||||||
Expected :"nameSpacedNode"
|
Expected:"nameSpacedNode" for expected.xml
|
||||||
Actual :"wrongNameSpacedNode"
|
Actual :"wrongNameSpacedNode"
|
|
@ -1,3 +1,3 @@
|
||||||
Namespaces differ at /root
|
Namespaces differ at /root
|
||||||
Expected :"http://www.example.com/FOO"
|
Expected:"http://www.example.com/FOO" for expected.xml
|
||||||
Actual :"http://www.example.com/BAR"
|
Actual :"http://www.example.com/BAR"
|
|
@ -1,3 +1,3 @@
|
||||||
node type mismatch in children of /root/blah
|
node type mismatch in children of /root/blah
|
||||||
Expected :"1"
|
Expected:"1" for expected.xml
|
||||||
Actual :"1"
|
Actual :"1"
|
|
@ -1,3 +1,3 @@
|
||||||
Text differs at /root/blah
|
Text differs at /root/blah
|
||||||
Expected :"expected"
|
Expected:"expected" for expected.xml
|
||||||
Actual :"different"
|
Actual :"different"
|
Loading…
Reference in New Issue