Search in sources :

Example 1 with GridOutputContainerLayoutManager

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

the class GridOutputContainerLayoutManagerDeserializerTest method deserialize_resultObjectHasColumns.

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

Example 2 with GridOutputContainerLayoutManager

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

the class GridOutputContainerLayoutManagerSerializerTest method setUp.

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

Aggregations

GridOutputContainerLayoutManager (com.twosigma.beakerx.jvm.object.GridOutputContainerLayoutManager)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