Exemplo n.º 1
0
 /** 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()));
 }
Exemplo n.º 2
0
 /** Writableのテスト。 */
 @Test
 public void write() {
   ShortOption option = new ShortOption();
   option.modify((short) 100);
   ShortOption restored = restore(option);
   assertThat(restored.get(), is(option.get()));
 }
Exemplo n.º 3
0
  /** 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));
  }
Exemplo n.º 4
0
 /** 値の取得。 */
 @Test
 public void get() {
   ShortOption option = new ShortOption();
   option.modify((short) 100);
   assertThat(option.get(), is((short) 100));
   assertThat(option.isNull(), is(false));
 }