Package com.couchace.jackson

Examples of com.couchace.jackson.JacksonCouchJsonStrategy


    private CouchDatabase couchDatabase;

    public TestSetup() {

        // REVIEW - Now using SSL Setup
        JacksonCouchJsonStrategy jsonStrategy = new JacksonCouchJsonStrategy(new JodaModule());
        couchSetup = new CouchSetup(couchUrl)
            .setUserName(userName)
            .setPassword(password)
            .setHttpClient(JerseyCouchHttpClient.class)
            .setJsonStrategy(jsonStrategy);
View Full Code Here


        assertEquals(location.getDirection(), "NORTH");
    }

    public void entityDocumentWithInjectableTest() {
        EntityMeta<LocationInjectedEntity> entityMeta = metaBuilder.buildEntityMeta(LocationInjectedEntity.class);
        JacksonCouchJsonStrategy strategy = new JacksonCouchJsonStrategy();
        strategy.setMissingInjectableResponse(MissingInjectableResponse.RETURN_NULL);
        SimpleCouchInjectables injectables = new SimpleCouchInjectables();
        injectables.addValue("injected", "injectedValue");
        strategy.setCouchInjectables(injectables);
        EntityDocument<LocationInjectedEntity> entityDoc = strategy.readEntityDocument(null, entityMeta, JacksonTestSetup.locationEntityDocJson);

        assertEquals(entityDoc.getDocumentId(), "1122");
        assertEquals(entityDoc.getEntityType(), "Location");
        assertEquals(entityDoc.getDocumentRevision(), "1-03ba856139647f1ed4694ceb1fe21751");
        LocationInjectedEntity location = entityDoc.getEntity();
View Full Code Here

        SimpleCouchInjectables injectables = new SimpleCouchInjectables();
        injectables.addValue(eventBus);
        injectables.addValue("logger", logger);

        // Create the strategy.
        JacksonCouchJsonStrategy jsonStrategy = new JacksonCouchJsonStrategy(new JodaModule());
        jsonStrategy.setCouchInjectables(injectables);
        CouchSetup couchSetup = new CouchSetup(couchUrl)
                .setUserName(TestSetup.userName)
                .setPassword(TestSetup.password)
                .setHttpClient(JerseyCouchHttpClient.class)
                .setJsonStrategy(jsonStrategy);
View Full Code Here

TOP

Related Classes of com.couchace.jackson.JacksonCouchJsonStrategy

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.