Skip to content

Commit

Permalink
Addressing PR comment about missed use of internal getter.
Browse files Browse the repository at this point in the history
  • Loading branch information
byarger-ebay committed Aug 17, 2023
1 parent 2344293 commit f0bba68
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion NST/src/main/java/com/ebay/jsonpath/JPBooleanCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
return;
}

if (isNull) {
if (isNullExpected()) {
softAssert.assertNull(value, AssertMessageBuilder.build(jsonPath, "with non-null boolean"));
} else {
softAssert.assertNotNull(value, AssertMessageBuilder.build(jsonPath, "with null boolean"));
Expand Down
2 changes: 1 addition & 1 deletion NST/src/main/java/com/ebay/jsonpath/JPDoubleCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
return;
}

if (isNull) {
if (isNullExpected()) {
softAssert.assertNull(value, AssertMessageBuilder.build(jsonPath, "with non-null double"));
} else {
softAssert.assertNotNull(value, AssertMessageBuilder.build(jsonPath, "with null double"));
Expand Down
2 changes: 1 addition & 1 deletion NST/src/main/java/com/ebay/jsonpath/JPIntegerCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
return;
}

if (isNull) {
if (isNullExpected()) {
softAssert.assertNull(value, AssertMessageBuilder.build(jsonPath, "with non-null integer"));
} else {
softAssert.assertNotNull(value, AssertMessageBuilder.build(jsonPath, "with null integer"));
Expand Down
2 changes: 1 addition & 1 deletion NST/src/main/java/com/ebay/jsonpath/JPJsonArrayCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
return;
}

if (isNull) {
if (isNullExpected()) {
softAssert.assertNull(values, AssertMessageBuilder.build(jsonPath, "because the path does exist"));
} else {
softAssert.assertNotNull(values, AssertMessageBuilder.build(jsonPath, "because the path does not exist"));
Expand Down
2 changes: 1 addition & 1 deletion NST/src/main/java/com/ebay/jsonpath/JPJsonObjectCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
return;
}

if (isNull) {
if (isNullExpected()) {
softAssert.assertNull(value, AssertMessageBuilder.build(jsonPath, "because the path does exist"));
} else {
softAssert.assertNotNull(value, AssertMessageBuilder.build(jsonPath, "because the path does not exist"));
Expand Down
4 changes: 2 additions & 2 deletions NST/src/main/java/com/ebay/jsonpath/JPListOfBooleanCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
return;
}

if (!isNull) {
if (!isNullExpected()) {
softAssert.assertNotNull(values, AssertMessageBuilder.build(jsonPath, "because the path does not exist"));
}

Expand All @@ -219,7 +219,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
continue;
}

if (isNull) {
if (isNullExpected()) {
softAssert.assertNull(value, AssertMessageBuilder.build(jsonPath, String.format("with NON null value on index %d of the list of Booleans", i)));
} else {
softAssert.assertNotNull(value, AssertMessageBuilder.build(jsonPath, String.format("with null value on index %d of the list of Booleans", i)));
Expand Down
4 changes: 2 additions & 2 deletions NST/src/main/java/com/ebay/jsonpath/JPListOfDoubleCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
return;
}

if (!isNull) {
if (!isNullExpected()) {
softAssert.assertNotNull(values, AssertMessageBuilder.build(jsonPath, "because the path does not exist."));
}

Expand All @@ -251,7 +251,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
continue;
}

if (isNull) {
if (isNullExpected()) {
softAssert.assertNull(value, AssertMessageBuilder.build(jsonPath, String.format("with NON null value on index %d of the list of Doubles", i)));
} else {
softAssert.assertNotNull(value, AssertMessageBuilder.build(jsonPath, String.format("with null value on index %d of the list of Doubles", i)));
Expand Down
4 changes: 2 additions & 2 deletions NST/src/main/java/com/ebay/jsonpath/JPListOfIntegerCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
return;
}

if (!isNull) {
if (!isNullExpected()) {
softAssert.assertNotNull(values, AssertMessageBuilder.build(jsonPath, "because the path does not exist"));
}

Expand All @@ -221,7 +221,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
continue;
}

if (isNull) {
if (isNullExpected()) {
softAssert.assertNull(value, AssertMessageBuilder.build(jsonPath, String.format("with NON null value on index %d of the list of Integers", i)));
} else {
softAssert.assertNotNull(value, AssertMessageBuilder.build(jsonPath, String.format("with null value on index %d of the list of Integers", i)));
Expand Down
4 changes: 2 additions & 2 deletions NST/src/main/java/com/ebay/jsonpath/JPListOfStringCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
return;
}

if (!isNull) {
if (!isNullExpected()) {
softAssert.assertNotNull(values, AssertMessageBuilder.build(jsonPath, "because the path does not exist"));
}

Expand All @@ -249,7 +249,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
continue;
}

if (isNull) {
if (isNullExpected()) {
softAssert.assertNull(value, AssertMessageBuilder.build(jsonPath, String.format("because the path does exist on index %d of the list of strings", i)));
} else {
softAssert.assertNotNull(value, AssertMessageBuilder.build(jsonPath, String.format("with null value on index %d of the list of strings", i)));
Expand Down
2 changes: 1 addition & 1 deletion NST/src/main/java/com/ebay/jsonpath/JPStringCheck.java
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public void processJsonPath(String jsonPath, SoftAssert softAssert, DocumentCont
return;
}

if (isNull) {
if (isNullExpected()) {
softAssert.assertNull(value, AssertMessageBuilder.build(jsonPath, "with non-null string"));
} else {
softAssert.assertNotNull(value, AssertMessageBuilder.build(jsonPath, "with null string."));
Expand Down

0 comments on commit f0bba68

Please sign in to comment.