use of com.twosigma.beakerx.jvm.ObserverObjectTest in project beakerx by twosigma.
the class SimpleEvaluationObjectTest method setUp.
@Before
public void setUp() throws Exception {
seo = new SimpleEvaluationObject("code");
observer = new ObserverObjectTest();
seo.addObserver(observer);
kernel = new KernelTest();
KernelManager.register(kernel);
}
use of com.twosigma.beakerx.jvm.ObserverObjectTest in project beakerx by twosigma.
the class BeakerDashboardTest method redraw_shouldUpdateObservers.
@Test
public void redraw_shouldUpdateObservers() throws Exception {
// given
ObserverObjectTest observer = new ObserverObjectTest();
dashboard.addObserver(observer);
// when
dashboard.redraw();
// then
Assertions.assertThat(observer.getObjectList()).isNotEmpty();
Assertions.assertThat(observer.getObjectList().get(0)).isEqualTo(dashboard);
}
use of com.twosigma.beakerx.jvm.ObserverObjectTest in project beakerx by twosigma.
the class UpdatableEvaluationResultTest method setValue_shouldNotifyObserver.
@Test
public void setValue_shouldNotifyObserver() throws Exception {
// given
UpdatableEvaluationResult result = new UpdatableEvaluationResult("test");
ObserverObjectTest observer = new ObserverObjectTest();
result.addObserver(observer);
// when
result.setValue("test");
// then
Assertions.assertThat(observer.getObjectList().get(0)).isEqualTo(result);
}
Aggregations