Package org.eurekastreams.commons.exceptions

Examples of org.eurekastreams.commons.exceptions.ValidationException


        context.checking(new Expectations()
        {
            {
                oneOf(postVerbValMock).validate(with(any(ActivityDTO.class)));
                will(throwException(new ValidationException()));
            }
        });

        sut.validate(currentActionContext);
        context.assertIsSatisfied();
View Full Code Here


        {
            {
                oneOf(postVerbValMock).validate(with(any(ActivityDTO.class)));

                oneOf(noteObjValMock).validate(with(any(ActivityDTO.class)));
                will(throwException(new ValidationException()));
            }
        });

        sut.validate(currentActionContext);
        context.assertIsSatisfied();
View Full Code Here

        firstPage.setTotal(total);
        firstPage.setFromIndex(0);
        firstPage.setToIndex(9);
        firstPage.setPagedSet(defs);

        final ValidationException ve = new ValidationException();
        ve.addError("url", "its messed up");

        context.checking(new Expectations()
        {
            {
                oneOf(pluginDefMapper).findAll(firstPage.getFromIndex(), firstPage.getToIndex());
View Full Code Here

                oneOf(transMgrMock).getTransaction(transDef);
                will(returnValue(transStatus));

                oneOf(validationStrategy).validate(serviceActionContext);
                will(throwException(new ValidationException()));

                oneOf(transStatus).isCompleted();
                will(returnValue(false));

                oneOf(transMgrMock).rollback(transStatus);
View Full Code Here

                oneOf(transMgrMock).getTransaction(transDef);
                will(returnValue(transStatus));

                oneOf(validationStrategy).validate(with(any(ServiceActionContext.class)));
                will(throwException(new ValidationException()));

                oneOf(transStatus).isCompleted();
                will(returnValue(false));

                oneOf(transMgrMock).rollback(transStatus);
View Full Code Here

    {
        mockery.checking(new Expectations()
        {
            {
                oneOf(validationStrategy).validate(with(contextWithPrincipalMatcher));
                will(throwException(new ValidationException("BAD!")));
            }
        });
        coreTest(true, serviceAction, serviceActionInnerContext, childParam);
        mockery.assertIsSatisfied();
    }
View Full Code Here

                oneOf(asyncActionMock).getValidationStrategy();
                will(returnValue(validationStrategy));

                oneOf(validationStrategy).validate(asyncActionContext);
                will(throwException(new ValidationException()));

                oneOf(transStatus).isCompleted();
                will(returnValue(false));

                oneOf(transMgrMock).rollback(transStatus);
View Full Code Here

                oneOf(queueSubmitterActionMock).getValidationStrategy();
                will(returnValue(validationStrategy));

                oneOf(validationStrategy).validate(asyncActionContextMock);
                will(throwException(new ValidationException()));

                oneOf(transStatus).isCompleted();
                will(returnValue(false));

                oneOf(transMgrMock).rollback(transStatus);
View Full Code Here

     * Tests how exceptions are returned to client.
     */
    @Test
    public void testValidationExceptionNonNested()
    {
        Exception exIn = new ValidationException();
        Exception exOut = coreForbidNestingExceptionTest(exIn);
        assertSame(exIn, exOut);
    }
View Full Code Here

    Map<String, Long> getTokenData(final String token, final byte[] key)
    {
        String tokenConent = tokenEncoder.decode(token, key);
        if (tokenConent == null)
        {
            throw new ValidationException("Cannot decrypt token for user.");
        }
        Map<String, Long> tokenData = tokenContentFormatter.parse(tokenConent);
        if (tokenData == null)
        {
            throw new ValidationException("Cannot parse token.");
        }
        return tokenData;
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.commons.exceptions.ValidationException

Copyright © 2018 www.massapicom. 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.