Search in sources :

Example 1 with DashboardLayoutManager

use of com.twosigma.beakerx.jvm.object.DashboardLayoutManager in project beakerx by twosigma.

the class DashboardLayoutManagerSerializerTest method setUp.

@Before
public void setUp() throws Exception {
    KernelManager.register(new KernelTest());
    layoutManager = new DashboardLayoutManager(5);
}
Also used : KernelTest(com.twosigma.beakerx.KernelTest) DashboardLayoutManager(com.twosigma.beakerx.jvm.object.DashboardLayoutManager) Before(org.junit.Before)

Example 2 with DashboardLayoutManager

use of com.twosigma.beakerx.jvm.object.DashboardLayoutManager in project beakerx by twosigma.

the class DashboardLayoutManagerDeserializerTest method deserialize_resultObjectHasColumns.

@Test
public void deserialize_resultObjectHasColumns() throws Exception {
    // given
    ObjectMapper mapper = new ObjectMapper();
    JsonNode actualObj = mapper.readTree(json);
    DashboardLayoutManagerDeserializer deserializer = new DashboardLayoutManagerDeserializer(new BasicObjectSerializer());
    // when
    DashboardLayoutManager layoutManager = (DashboardLayoutManager) deserializer.deserialize(actualObj, mapper);
    // then
    Assertions.assertThat(layoutManager).isNotNull();
    Assertions.assertThat(layoutManager.getColumns()).isEqualTo(columns);
}
Also used : DashboardLayoutManager(com.twosigma.beakerx.jvm.object.DashboardLayoutManager) JsonNode(com.fasterxml.jackson.databind.JsonNode) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.Test)

Aggregations

DashboardLayoutManager (com.twosigma.beakerx.jvm.object.DashboardLayoutManager)2 JsonNode (com.fasterxml.jackson.databind.JsonNode)1 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 KernelTest (com.twosigma.beakerx.KernelTest)1 Before (org.junit.Before)1 Test (org.junit.Test)1