Search in sources :

Example 1 with OutputContainerCell

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

the class OutputContainerCellDeserializerTest method deserialize_resultObjectHasLabels.

@Test
public void deserialize_resultObjectHasLabels() throws Exception {
    // given
    ObjectMapper mapper = new ObjectMapper();
    JsonNode actualObj = mapper.readTree(json);
    OutputContainerCellDeserializer deserializer = new OutputContainerCellDeserializer(new BasicObjectSerializer());
    // when
    OutputContainerCell outputContainerCell = (OutputContainerCell) deserializer.deserialize(actualObj, mapper);
    // then
    Assertions.assertThat(outputContainerCell).isNotNull();
    Assertions.assertThat(outputContainerCell.getLabels()).isNotEmpty();
}
Also used : OutputContainerCell(com.twosigma.beakerx.jvm.object.OutputContainerCell) JsonNode(com.fasterxml.jackson.databind.JsonNode) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) Test(org.junit.Test)

Example 2 with OutputContainerCell

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

the class OutputContainerCellSerializerTest method setUp.

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

Aggregations

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