MCPcopy Create free account
hub / github.com/androrm/androrm / testDelete

Method testDelete

test/src/com/orm/androrm/test/ModelTest.java:53–68  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51 }
52
53 public void testDelete() {
54 BlankModel m = new BlankModel();
55
56 assertFalse(m.delete(getContext()));
57
58 m.save(getContext());
59
60 int id = m.getId();
61
62 assertTrue(m.delete(getContext()));
63 assertNull(m.getName());
64 assertNull(m.getLocation());
65 assertNull(m.getDate());
66 assertNull(Model.objects(getContext(), BlankModel.class).get(id));
67 assertEquals(0, m.getId());
68 }
69
70 public void testEquals() {
71 BlankModel m = new BlankModel();

Callers

nothing calls this directly

Calls 8

getNameMethod · 0.95
getLocationMethod · 0.95
getDateMethod · 0.95
objectsMethod · 0.95
saveMethod · 0.80
getIdMethod · 0.80
getMethod · 0.65
deleteMethod · 0.45

Tested by

no test coverage detected