@Test public void lifeCycle() { Game aGame = TestFixture.aGame(); aGame.dealInitialCards(); JsonPersistenceAssembler<Game> assembler = store.assembler(); JsonPersistenceObject<Game> persistenceGame = assembler.toPersistence(aGame); store.create(persistenceGame); JsonPersistenceObject<Game> retrievedPGame = store.find((PersistenceObjectId<GameID>) persistenceGame.id()); Game retrievedGame = assembler.toDomain(retrievedPGame); assertEquals(aGame.getID(), retrievedGame.getID()); }
@Before public void setup() { store.clear(); }