package com.gentics.mesh.cli;

import org.junit.Test;

import com.gentics.mesh.etc.DaggerMeshDagger;
import com.gentics.mesh.etc.MeshDagger;
import com.gentics.mesh.graphdb.NoTx;

public class DaggerTest {

	@Test
	public void testInMemory() {
		InMemoryMeshDagger meshDagger = DaggerInMemoryMeshDagger.builder().build();
		try (NoTx noTx = meshDagger.database().noTx()) {
			System.out.println("Found Groups: {" + meshDagger.boot().groupRoot().findAll().size() + "}");
		}
		System.out.println(meshDagger.userVerticle());
		System.out.println(meshDagger.config().database());
		System.out.println(meshDagger.userVerticle());
	}

	@Test
	public void test() {
		MeshDagger meshDagger = DaggerMeshDagger.builder().build();
		meshDagger.boot().groupRoot();
	}

}

@@ -45,14 +45,96 @@
 nit.
-Test;%0A
+Before;%0Aimport org.junit.Test;%0A%0Aimport com.gentics.mesh.core.verticle.user.UserVerticle;
 %0Aimp
@@ -287,121 +287,267 @@
 %7B%0A%0A%09
-@Test%0A%09public void testInMemory() %7B%0A%09%09InMemoryMeshDagger meshDagger = DaggerInMemoryMeshDagger.builder().build();
+private InMemoryMeshDagger meshDagger;%0A%0A%09private UserVerticle userVerticle;%0A%0A%09@Before%0A%09public void setup() %7B%0A%09%09meshDagger = DaggerInMemoryMeshDagger.builder().build();%0A%09%09this.userVerticle = meshDagger.userVerticle();%0A%09%7D%0A%09@Test%0A%09public void testInMemory() %7B%0A%09%09
 %0A%09%09t
@@ -815,35 +815,24 @@
 out.println(
-meshDagger.
 userVerticle
@@ -827,26 +827,24 @@
 userVerticle
-()
 );%0A%09%7D%0A%0A%09@Tes
@@ -867,16 +867,18 @@
 est() %7B%0A
+//
 %09%09MeshDa
@@ -931,16 +931,18 @@
 uild();%0A
+//
 %09%09meshDa

Add draft