Fix tests

pull/467/head
Alex Baker 9 years ago
parent 3fbd9b32c0
commit f96490641a

@ -25,6 +25,7 @@ public class GtaskListMaker {
private static final Instantiator<GtasksList> instantiator = lookup -> { private static final Instantiator<GtasksList> instantiator = lookup -> {
StoreObject storeObject = new StoreObject() {{ StoreObject storeObject = new StoreObject() {{
setType(GtasksList.TYPE); setType(GtasksList.TYPE);
setValue(StoreObject.DELETION_DATE, 0L);
setValue(StoreObject.ID, lookup.valueOf(GtaskListMaker.ID, 0L)); setValue(StoreObject.ID, lookup.valueOf(GtaskListMaker.ID, 0L));
setValue(StoreObject.ITEM, lookup.valueOf(REMOTE_ID, "1")); setValue(StoreObject.ITEM, lookup.valueOf(REMOTE_ID, "1"));
setValue(StoreObject.VALUE1, lookup.valueOf(NAME, "Default")); setValue(StoreObject.VALUE1, lookup.valueOf(NAME, "Default"));

@ -56,11 +56,13 @@ public class GtasksListServiceTest extends DatabaseTestCase {
with(RemoteGtaskListMaker.REMOTE_ID, "1"), with(RemoteGtaskListMaker.REMOTE_ID, "1"),
with(RemoteGtaskListMaker.NAME, "Default"))); with(RemoteGtaskListMaker.NAME, "Default")));
verify(storeObjectDao).persist(newGtaskList( assertEquals(
with(ID, 1L), newGtaskList(
with(REMOTE_ID, "1"), with(ID, 1L),
with(NAME, "Default"), with(REMOTE_ID, "1"),
with(SAVED, true))); with(NAME, "Default"),
with(SAVED, true)),
storeObjectDao.getGtasksList(1L));
} }
@Test @Test

Loading…
Cancel
Save