Search in sources :

Example 6 with IntSlider

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

the class IntSliderTest method shouldSendCommMsgWhenChangeContinuous_update.

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

Example 7 with IntSlider

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

the class IntSliderTest method setContinuousUpdate_hasThatContinuousUpdateFlag.

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

Example 8 with IntSlider

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

the class LinkTest method createWithFourParams_shouldSendCommOpenMessage.

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

Example 9 with IntSlider

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

the class CyclingDisplayBoxTest method createWithParam_shouldSendCommOpenMessage.

@Test
public void createWithParam_shouldSendCommOpenMessage() throws Exception {
    // given
    List<Widget> children = Arrays.asList(new IntSlider(), new Text());
    kernel.clearPublishedMessages();
    // when
    new CyclingDisplayBox(children);
    // then
    verifyInternalOpenCommMsgWitLayout(kernel.getPublishedMessages(), CyclingDisplayBox.MODEL_NAME_VALUE, CyclingDisplayBox.VIEW_NAME_VALUE);
}
Also used : Widget(com.twosigma.beakerx.widget.Widget) Text(com.twosigma.beakerx.widget.Text) CyclingDisplayBox(com.twosigma.beakerx.widget.CyclingDisplayBox) IntSlider(com.twosigma.beakerx.widget.IntSlider) Test(org.junit.Test) KernelTest(com.twosigma.beakerx.KernelTest)

Example 10 with IntSlider

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

the class TabTest method shouldSendCommOpenWhenCreateWithChildren.

@Test
public void shouldSendCommOpenWhenCreateWithChildren() throws Exception {
    // given
    List<Widget> children = asList(new IntSlider(), new Text());
    kernel.clearPublishedMessages();
    // when
    new Tab(children, asList("t1", "t2"));
    // then
    verifyInternalOpenCommMsgWitLayout(kernel.getPublishedMessages(), Tab.MODEL_NAME_VALUE, Tab.VIEW_NAME_VALUE);
    verifyChildren(children);
    verifyTitles();
}
Also used : Tab(com.twosigma.beakerx.widget.Tab) 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)

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