public boolean isChecked() { return TRUE.equals(getValue()); }
@Test public void testContainsBound() { Binder b = new Binder(); StubCheckBox c = new StubCheckBox(); BooleanProperty s = p.contains("s"); b.bind(s).to(c); assertThat(c.getValue(), is(false)); }
@Test public void testContainsBoundWhenAlreadyTrue() { Binder b = new Binder(); StubCheckBox c = new StubCheckBox(); p.add("s"); BooleanProperty s = p.contains("s"); b.bind(s).to(c); assertThat(c.getValue(), is(true)); }
@Test public void testContainsBoundWhenModelChanges() { Binder b = new Binder(); StubCheckBox c = new StubCheckBox(); BooleanProperty s = p.contains("s"); b.bind(s).to(c); p.add("s"); assertThat(c.getValue(), is(true)); }