Examples of ServletRequestAttributes


Examples of org.springframework.web.context.request.ServletRequestAttributes

    @Test
    public void testCoincidenceCaptchaWithInputValue() throws Exception {
        UserDto userDto = createUserDto();
        session.setAttribute(Constants.KAPTCHA_SESSION_KEY, GENERATED_CAPTCHA_TEXT);
        RequestContextHolder.setRequestAttributes(new ServletRequestAttributes(request));

        Map<String, String> errors = service.validateCaptcha(userDto, 1L);

        assertTrue(errors.isEmpty(), "Validation of captcha with valid value should not return any errors.");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.