Exemplo n.º 1
0
 @Test
 public void createsMissingStateByDefault() {
   SyncState state = new SyncState();
   assertThat(state.isExisting(), is(false));
   assertThat(state.getMtime(), is(nullValue()));
   assertThat(state.getSize(), is(nullValue()));
 }
Exemplo n.º 2
0
 @Test
 public void providesValues() {
   SyncState state = new SyncState(true, 10L, 20L);
   assertThat(state.isExisting(), is(true));
   assertThat(state.getMtime(), is(10L));
   assertThat(state.getSize(), is(20L));
 }
Exemplo n.º 3
0
 public static SyncState fromInteger(Integer integer) {
   if (integer != null) {
     for (SyncState b : SyncState.values()) {
       if (integer.equals(b.code)) {
         return b;
       }
     }
   }
   return null;
 }
Exemplo n.º 4
0
 private void assertUnequal(SyncState actual, SyncState expected) {
   assertThat(actual, is(not(equalTo(expected))));
   assertThat(actual.hashCode(), is(not(equalTo(expected.hashCode()))));
 }