private static SeLionSoftAssert getSoftAssertInContext() {
        SeLionSoftAssert sa;
        if (null == Reporter.getCurrentTestResult()) {
            // Assume Java Application, and return the static instance of SeLionSoftAssert.
            sa = softAssert;
        }
        else {
            sa = (SeLionSoftAssert) Reporter.getCurrentTestResult().getAttribute(
                SeLionSoftAssert.SOFT_ASSERT_ATTRIBUTE_NAME);
        }
        return sa;
    }
private static SeLionSoftAssert getSoftAssertInContext ( ) { SeLionSoftAssert sa ; if ( null == Reporter . getCurrentTestResult ( ) ) { sa = softAssert ; } else { sa = ( SeLionSoftAssert ) Reporter . getCurrentTestResult ( ) . getAttribute ( SeLionSoftAssert . SOFT_ASSERT_ATTRIBUTE_NAME ) ; } return sa ; }
Gets the instance of {@link SeLionSoftAssert} depending on whether the soft assert methods
(verify methods) are being called in TestNG context or as a Java application.
@return A {@link SeLionSoftAssert} instance.