예제 #1
0
 @Test
 public void shouldNotBeNewIfThereIsID() throws JSONException {
   Child child = new Child();
   child.put(internal_id.getColumnName(), "xyz");
   assertThat(child.isNew(), is(false));
 }
예제 #2
0
 @Test
 public void shouldBeNewIfThereIsNoID() throws JSONException {
   Child child = new Child("id1", "user1", "{ 'test1' : 'value1' }");
   assertThat(child.isNew(), is(true));
 }