Package com.couchace.core.api.injectable

Examples of com.couchace.core.api.injectable.SimpleCouchInjectables.addValue()


    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");
View Full Code Here


        // Use much of CouchSetup from TestSetup with the addition of injectables.
        String couchUrl = TestSetup.couchUrl;

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

        // Create the strategy.
        JacksonCouchJsonStrategy jsonStrategy = new JacksonCouchJsonStrategy(new JodaModule());
        jsonStrategy.setCouchInjectables(injectables);
View Full Code Here

        String couchUrl = TestSetup.couchUrl;

        // Configure injectables with logger.
        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)
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.