Package org.jongo.util

Examples of org.jongo.util.ErrorObject


    JacksonEngine engine = new JacksonEngine(new Mapping.Builder().build());

    @Test(expected = MarshallingException.class)
    public void shouldFailWhenUnableToMarshall() throws Exception {

        engine.marshall(new ErrorObject());
    }
View Full Code Here


    @Test
    public void shouldFailWhenMarshallerFail() throws Exception {

        try {
            collection.save(new ErrorObject());
            Assert.fail();
        } catch (IllegalArgumentException e) {
            assertThat(e.getMessage()).contains("Unable to save object");
        }
    }
View Full Code Here

    }

    @Test(expected = IllegalArgumentException.class)
    public void shouldFailWithInvalidParameter() throws Exception {

        factory.createQuery("{id:#}", new ErrorObject());
    }
View Full Code Here

    }

    @Test
    public void shouldThrowMarshallExceptionOnInvalidParameter() throws Exception {
        try {
            collection.findOne("{id:#}", new ErrorObject()).as(Friend.class);
        } catch (Exception e) {
            assertThat(e).isInstanceOf(IllegalArgumentException.class);
            assertThat(e.getCause()).isInstanceOf(MarshallingException.class);
            assertThat(e.getMessage()).contains("{id:#}");
        }
View Full Code Here

TOP

Related Classes of org.jongo.util.ErrorObject

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.