mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[JPS|Junit] cleanup: renamed the filePath property to the expectedFilePath in the ComparisonFailureData
GitOrigin-RevId: d13782b2fbff67943997fffd9b903043e9c6c800
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c7aa0d58eb
commit
5cd12bd0de
@@ -28,7 +28,7 @@ public class ComparisonFailureData {
|
||||
|
||||
private final String myExpected;
|
||||
private final String myActual;
|
||||
private final String myFilePath;
|
||||
private final String myExpectedFilePath;
|
||||
private final String myActualFilePath;
|
||||
|
||||
private static final Map<Class<?>, Field> EXPECTED = new HashMap<>();
|
||||
@@ -60,14 +60,14 @@ public class ComparisonFailureData {
|
||||
this(expected, actual, null);
|
||||
}
|
||||
|
||||
public ComparisonFailureData(String expected, String actual, String filePath) {
|
||||
this(expected, actual, filePath, null);
|
||||
public ComparisonFailureData(String expected, String actual, String expectedFilePath) {
|
||||
this(expected, actual, expectedFilePath, null);
|
||||
}
|
||||
|
||||
public ComparisonFailureData(String expected, String actual, String filePath, String actualFilePath) {
|
||||
public ComparisonFailureData(String expected, String actual, String expectedFilePath, String actualFilePath) {
|
||||
myExpected = expected;
|
||||
myActual = actual;
|
||||
myFilePath = filePath != null ? new File(filePath).getAbsolutePath() : null;
|
||||
myExpectedFilePath = expectedFilePath != null ? new File(expectedFilePath).getAbsolutePath() : null;
|
||||
myActualFilePath = actualFilePath != null ? new File(actualFilePath).getAbsolutePath() : null;
|
||||
}
|
||||
|
||||
@@ -106,17 +106,17 @@ public class ComparisonFailureData {
|
||||
attrs.put("message", comparisonFailureMessage);
|
||||
}
|
||||
|
||||
final String filePath = notification.getFilePath();
|
||||
final String expectedFilePath = notification.getExpectedFilePath();
|
||||
final String actualFilePath = notification.getActualFilePath();
|
||||
final String expected = notification.getExpected();
|
||||
final String actual = notification.getActual();
|
||||
|
||||
int fullLength = (filePath == null && expected != null ? expected.length() : 0) +
|
||||
int fullLength = (expectedFilePath == null && expected != null ? expected.length() : 0) +
|
||||
(actualFilePath == null && actual != null ? actual.length() : 0) +
|
||||
details.length() +
|
||||
comparisonFailureMessage.length() + 100;
|
||||
if (filePath != null) {
|
||||
attrs.put("expectedFile", filePath);
|
||||
if (expectedFilePath != null) {
|
||||
attrs.put("expectedFile", expectedFilePath);
|
||||
}
|
||||
else {
|
||||
writeDiffSide(attrs, "expected", expected, fullLength);
|
||||
@@ -183,8 +183,8 @@ public class ComparisonFailureData {
|
||||
return isAssertionError(throwableClass.getSuperclass());
|
||||
}
|
||||
|
||||
public String getFilePath() {
|
||||
return myFilePath;
|
||||
public String getExpectedFilePath() {
|
||||
return myExpectedFilePath;
|
||||
}
|
||||
|
||||
public String getActualFilePath() {
|
||||
|
||||
Reference in New Issue
Block a user