Search in sources :

Example 11 with IntSlider

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

the class DirectionalLinkTest method createWithFourParams_shouldSendCommOpenMessage.

@Test
public void createWithFourParams_shouldSendCommOpenMessage() throws Exception {
    // given
    Widget source = new IntSlider();
    Widget target = new Text();
    kernel.clearPublishedMessages();
    // when
    new DirectionalLink(source, "source", target, "target");
    // then
    Assertions.assertThat(SearchMessages.getListWidgetsByModelName(kernel.getPublishedMessages(), DirectionalLink.MODEL_NAME_VALUE)).isNotEmpty();
}
Also used : DirectionalLink(com.twosigma.beakerx.widget.DirectionalLink) Widget(com.twosigma.beakerx.widget.Widget) Text(com.twosigma.beakerx.widget.Text) IntSlider(com.twosigma.beakerx.widget.IntSlider) Test(org.junit.Test) KernelTest(com.twosigma.beakerx.KernelTest)

Example 12 with IntSlider

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

the class DisplayTest method shouldSendMessageForWidget.

@Test
public void shouldSendMessageForWidget() {
    // given
    // when
    Display.display(new IntSlider());
    // then
    verifyWidget();
}
Also used : IntSlider(com.twosigma.beakerx.widget.IntSlider) Test(org.junit.Test)

Example 13 with IntSlider

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

the class AccordionTest method setUp.

@Before
public void setUp() throws Exception {
    kernel = new KernelTest();
    KernelManager.register(kernel);
    children = Arrays.asList(new IntSlider(), new Text());
    kernel.clearPublishedMessages();
}
Also used : KernelTest(com.twosigma.beakerx.KernelTest) Text(com.twosigma.beakerx.widget.Text) IntSlider(com.twosigma.beakerx.widget.IntSlider) Before(org.junit.Before)

Example 14 with IntSlider

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

the class IntSliderTest method shouldSendCommMsgWhenValueChange.

@Test
public void shouldSendCommMsgWhenValueChange() throws Exception {
    // given
    IntSlider intSlider = intSlider();
    // when
    intSlider.setValue(11);
    // then
    verifyMsgForProperty(groovyKernel, IntSlider.VALUE, 11);
}
Also used : IntSlider(com.twosigma.beakerx.widget.IntSlider) Test(org.junit.Test) KernelTest(com.twosigma.beakerx.KernelTest)

Example 15 with IntSlider

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

the class IntSliderTest method shouldSendCommMsgWhenMsg_throttleChange.

@Test
public void shouldSendCommMsgWhenMsg_throttleChange() throws Exception {
    // given
    IntSlider intSlider = intSlider();
    // when
    intSlider.setMsg_throttle(12);
    // then
    verifyMsgForProperty(groovyKernel, Widget.MSG_THROTTLE, 12);
}
Also used : IntSlider(com.twosigma.beakerx.widget.IntSlider) Test(org.junit.Test) KernelTest(com.twosigma.beakerx.KernelTest)

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