/** Writableのテスト。 */ @Test public void write_min() { ShortOption option = new ShortOption(); option.modify(Short.MIN_VALUE); ShortOption restored = restore(option); assertThat(restored.get(), is(option.get())); }
/** Writableのテスト。 */ @Test public void write() { ShortOption option = new ShortOption(); option.modify((short) 100); ShortOption restored = restore(option); assertThat(restored.get(), is(option.get())); }
/** copyFromのテスト。 */ @Test public void copy() { ShortOption option = new ShortOption(); ShortOption other = new ShortOption(); other.modify((short) 50); option.copyFrom(other); assertThat(option.get(), is((short) 50)); option.modify((short) 0); assertThat(other.get(), is((short) 50)); }
/** 値の取得。 */ @Test public void get() { ShortOption option = new ShortOption(); option.modify((short) 100); assertThat(option.get(), is((short) 100)); assertThat(option.isNull(), is(false)); }