package cane.brothers.circus;

import javax.annotation.Resource;

import org.junit.Before;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import cane.brothers.circus.repository.TroupeRepository;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration
public class TestTroupeRepository {

	@Resource
	private TroupeRepository troupeRepo;
	
	@Before
	public void createTroupes() {
		// TODO
	}
}

@@ -22,24 +22,115 @@
 .circus;%0D%0A%0D%0A
+import static org.hamcrest.CoreMatchers.is;%0D%0Aimport static org.junit.Assert.assertThat;%0D%0A%0D%0A
 import javax
@@ -171,22 +171,20 @@
 g.junit.
-Before
+Test
 ;%0D%0Aimpor
@@ -346,24 +346,68 @@
 sRunner;%0D%0A%0D%0A
+import cane.brothers.circus.domain.Troupe;%0D%0A
 import cane.
@@ -516,16 +516,43 @@
 guration
+(classes = JpaConfig.class)
 %0D%0Apublic
@@ -644,14 +644,12 @@
 %0D%0A%09@
-Before
+Test
 %0D%0A%09p
@@ -684,15 +684,144 @@
 %0D%0A%09%09
-// TODO
+Troupe liones = troupeRepo.save(new Troupe(%22%D0%9A%D0%B0%D0%BD%D1%81%D0%BA%D0%B8%D0%B5 %D0%9B%D1%8C%D0%B2%D1%8B%22, %22%D0%9C%D0%B8%D1%85%D0%B0%D0%B8%D0%BB%D0%BA%D0%BE%D0%B2%22));%0D%0A%09%09assertThat(troupeRepo.findOne(liones.getId()), is(liones));
 %0D%0A%09%7D

test works