/** * test for copyFrom w/ null. */ @Test public void copyNull() { BooleanOption option = new BooleanOption(); option.modify(true); BooleanOption other = new BooleanOption(); option.copyFrom(other); assertThat(option.isNull(), is(true)); option.modify(true); option.copyFrom(null); assertThat(option.isNull(), is(true)); }
/** * test for copyFrom. */ @Test public void copy() { BooleanOption option = new BooleanOption(); BooleanOption other = new BooleanOption(); other.modify(true); option.copyFrom(other); assertThat(option.get(), is(true)); option.modify(false); assertThat(other.get(), is(true)); }