Search in sources :

Example 1 with MongoDBNoSqlAdapter

use of org.apache.sling.nosql.mongodb.resourceprovider.impl.MongoDBNoSqlAdapter in project sling by apache.

the class IndexCreationIT method setUp.

@Before
public void setUp() throws Exception {
    String connectionString = System.getProperty("connectionString", "localhost:27017");
    database = System.getProperty("database", "sling") + "_indextest";
    collection = System.getProperty("collection", "resources");
    mongoClient = new MongoClient(connectionString);
    underTest = new MongoDBNoSqlAdapter(mongoClient, database, collection);
    underTest.checkConnection();
    underTest.createIndexDefinitions();
}
Also used : MongoClient(com.mongodb.MongoClient) MongoDBNoSqlAdapter(org.apache.sling.nosql.mongodb.resourceprovider.impl.MongoDBNoSqlAdapter) Before(org.junit.Before)

Aggregations

MongoClient (com.mongodb.MongoClient)1 MongoDBNoSqlAdapter (org.apache.sling.nosql.mongodb.resourceprovider.impl.MongoDBNoSqlAdapter)1 Before (org.junit.Before)1