Search in sources :

Example 16 with IntSlider

use of com.twosigma.beakerx.widget.IntSlider in project beakerx by twosigma.

the class IntSliderTest method shouldSendCommMsgWhenOrientationChange.

@Test
public void shouldSendCommMsgWhenOrientationChange() throws Exception {
    // given
    IntSlider intSlider = intSlider();
    // when
    intSlider.setOrientation("vertical");
    // then
    verifyMsgForProperty(groovyKernel, IntSlider.ORIENTATION, "vertical");
}
Also used : IntSlider(com.twosigma.beakerx.widget.IntSlider) Test(org.junit.Test) KernelTest(com.twosigma.beakerx.KernelTest)

Example 17 with IntSlider

use of com.twosigma.beakerx.widget.IntSlider in project beakerx by twosigma.

the class IntSliderTest method shouldSendCommMsgWhenMinChange.

@Test
public void shouldSendCommMsgWhenMinChange() throws Exception {
    // given
    IntSlider intSlider = intSlider();
    // when
    intSlider.setMin(10);
    // then
    verifyMsgForProperty(groovyKernel, BoundedIntWidget.MIN, 10);
}
Also used : IntSlider(com.twosigma.beakerx.widget.IntSlider) Test(org.junit.Test) KernelTest(com.twosigma.beakerx.KernelTest)

Example 18 with IntSlider

use of com.twosigma.beakerx.widget.IntSlider in project beakerx by twosigma.

the class IntSliderTest method shouldSendCommMsgWhenVisibleChange.

@Test
public void shouldSendCommMsgWhenVisibleChange() throws Exception {
    // given
    IntSlider intSlider = intSlider();
    // when
    intSlider.getLayout().setVisibility("hidden");
    // then
    verifyMsgForProperty(groovyKernel, Layout.VISIBILITY, "hidden");
}
Also used : IntSlider(com.twosigma.beakerx.widget.IntSlider) Test(org.junit.Test) KernelTest(com.twosigma.beakerx.KernelTest)

Example 19 with IntSlider

use of com.twosigma.beakerx.widget.IntSlider in project beakerx by twosigma.

the class IntSliderTest method setReadout_hasThatReadoutFlag.

@Test
public void setReadout_hasThatReadoutFlag() throws Exception {
    boolean expected = true;
    // given
    IntSlider intSlider = intSlider();
    // when
    intSlider.setReadOut(expected);
    // then
    Assertions.assertThat(intSlider.getReadOut()).isEqualTo(expected);
}
Also used : IntSlider(com.twosigma.beakerx.widget.IntSlider) Test(org.junit.Test) KernelTest(com.twosigma.beakerx.KernelTest)

Example 20 with IntSlider

use of com.twosigma.beakerx.widget.IntSlider in project beakerx by twosigma.

the class IntSliderTest method intSlider.

private IntSlider intSlider() throws NoSuchAlgorithmException {
    IntSlider intSlider = new IntSlider();
    groovyKernel.clearPublishedMessages();
    return intSlider;
}
Also used : IntSlider(com.twosigma.beakerx.widget.IntSlider)

Aggregations

IntSlider (com.twosigma.beakerx.widget.IntSlider)21 KernelTest (com.twosigma.beakerx.KernelTest)19 Test (org.junit.Test)19 Text (com.twosigma.beakerx.widget.Text)5 Widget (com.twosigma.beakerx.widget.Widget)4 CyclingDisplayBox (com.twosigma.beakerx.widget.CyclingDisplayBox)1 DirectionalLink (com.twosigma.beakerx.widget.DirectionalLink)1 Link (com.twosigma.beakerx.widget.Link)1 Tab (com.twosigma.beakerx.widget.Tab)1 Before (org.junit.Before)1