Skip to content

Commit

Permalink
Updates for recent API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
egonw committed Jul 16, 2024
1 parent 89eec1a commit dd16104
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public void performAssertions(List<IAssertion> assertions) {
typedAssertion.getExpectedValue(),
typedAssertion.getValue(),
typedAssertion.getMessage() +
(typedAssertion.hasLinkToDocs() ? (" (See " + typedAssertion.getLinkToDocs() + "). ") : "") +
(typedAssertion.getTest().hasLinkToDocs() ? (" (See " + typedAssertion.getTest().getLinkToDocs() + "). ") : "") +
". Details:\n" + typedAssertion.getDetails()
);
} else if (assertion instanceof AssertNotSame) {
Expand All @@ -34,23 +34,23 @@ public void performAssertions(List<IAssertion> assertions) {
typedAssertion.getExpectedValue(),
typedAssertion.getValue(),
typedAssertion.getMessage() +
(typedAssertion.hasLinkToDocs() ? (" (See " + typedAssertion.getLinkToDocs() + "). ") : "") +
(typedAssertion.getTest().hasLinkToDocs() ? (" (See " + typedAssertion.getTest().getLinkToDocs() + "). ") : "") +
". Details:\n" + typedAssertion.getDetails()
);
} else if (assertion instanceof AssertNotNull) {
AssertNotNull typedAssertion = (AssertNotNull)assertion;
Assertions.assertNotNull(
typedAssertion.getValue(),
typedAssertion.getMessage() +
(typedAssertion.hasLinkToDocs() ? (" (See " + typedAssertion.getLinkToDocs() + "). ") : "") +
(typedAssertion.getTest().hasLinkToDocs() ? (" (See " + typedAssertion.getTest().getLinkToDocs() + "). ") : "") +
". Details:\n" + typedAssertion.getDetails()
);
} else if (assertion instanceof AssertTrue) {
AssertTrue typedAssertion = (AssertTrue)assertion;
Assertions.assertTrue(
(boolean)typedAssertion.getValue(),
typedAssertion.getMessage() +
(typedAssertion.hasLinkToDocs() ? (" (See " + typedAssertion.getLinkToDocs() + "). ") : "") +
(typedAssertion.getTest().hasLinkToDocs() ? (" (See " + typedAssertion.getTest().getLinkToDocs() + "). ") : "") +
". Details:\n" + typedAssertion.getDetails()
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,35 +54,35 @@ public static void loadData() throws InterruptedException {

@Test
public void nonNumericPubMedIDs() throws Exception {
performAssertions(ReferencesTests.nonNumericPubMedIDs(helper));
performAssertions(ReferencesTests.nonNumericPubMedIDs(helper, null));
}

@Test
@Tag("foo")
public void unexpectedPubMedIdentifier() throws Exception {
performAssertions(ReferencesTests.unexpectedPubMedIdentifier(helper));
performAssertions(ReferencesTests.unexpectedPubMedIdentifier(helper, null));
}

@Test
public void zeroPubMedIDs() throws Exception {
performAssertions(ReferencesTests.zeroPubMedIDs(helper));
performAssertions(ReferencesTests.zeroPubMedIDs(helper, null));
}

@Tag("expertCuration")
@Test
public void atLeastOneReference() throws Exception {
performAssertions(ReferencesTests.atLeastOneReference(helper));
performAssertions(ReferencesTests.atLeastOneReference(helper, null));
}

@Test
public void citesRetractedArticle() throws Exception {
performAssertions(ReferencesTests.citesRetractedArticle(helper));
performAssertions(ReferencesTests.citesRetractedArticle(helper, null));
}

@Test
@Tag("foo")
public void outdatedPubMedIdentifiers() throws Exception {
performAssertions(ReferencesTests.outdatedPubMedIdentifiers(helper));
performAssertions(ReferencesTests.outdatedPubMedIdentifiers(helper, null));
}


Expand Down

0 comments on commit dd16104

Please sign in to comment.