Package com.couchace.core.api

Examples of com.couchace.core.api.CouchSetup


        super(createCouchSetup());
    }

    private static CouchSetup createCouchSetup() {
        MockCouchJsonStrategy mockStrategy = new MockCouchJsonStrategy();
        return new CouchSetup("http://localhost:5984/")
            .setUserName("test")
            .setPassword("password")
            .setHttpClient(MockCouchHttpClient.class)
            .setJsonStrategy(mockStrategy);
    }
View Full Code Here


        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);
        if (couchUrl.startsWith("https")) {
            File moduleDir = IOUtil.findDirNear(IOUtil.currentDir(), "couchace-all");
            File keystoreFile = new File(moduleDir, "src/test/resources/couch-test.jks");
            couchSetup.ssl(keystoreFile.getAbsolutePath(), TestSetup.storePass);
        }

        CouchServer couchServer = new CouchServer(couchSetup);
        couchDatabase = couchServer.database(TestSetup.databaseName);
View Full Code Here

TOP

Related Classes of com.couchace.core.api.CouchSetup

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.