NdsBeisEsb/src/test/java/com/northgateps/nds/beis/esb/beisregistration/BeisRegistrationCamelSpringTestSupport.java
/**
     * Extract the activation code for use in other tests.
     */
Extract the activation code for use in other tests.
Extract the activation code for use in other tests .
protected String extractActivationCodeFromBody(String body, String username) {
        final String emailTextLine2 = ">Activate your account</a>";
        final String activationCodeText = "activationCode=";
        int indexOfCodeLabel = body.indexOf(activationCodeText);
        int indexOfCodeValue = indexOfCodeLabel + activationCodeText.length();
        int indexOfEmailTextLine2 = body.indexOf(emailTextLine2);
        final String activationCode = body.substring(indexOfCodeValue, indexOfEmailTextLine2 - 1).trim();
        logger.info("User " + username + " activationCode is " + activationCode);
        return activationCode;
    }
protected String extractActivationCodeFromBody ( String body , String username ) { final String emailTextLine2 = ">Activate your account</a>" ; final String activationCodeText = "activationCode=" ; int indexOfCodeLabel = body . indexOf ( activationCodeText ) ; int indexOfCodeValue = indexOfCodeLabel + activationCodeText . length ( ) ; int indexOfEmailTextLine2 = body . indexOf ( emailTextLine2 ) ; final String activationCode = body . substring ( indexOfCodeValue , indexOfEmailTextLine2 - 1 ) . trim ( ) ; logger . info ( "User " + username + " activationCode is " + activationCode ) ; return activationCode ; }
Extract the activation code for use in other tests.
Extract the activation code for use in other tests .