Search in sources :

Example 1 with CyclingOutputContainerLayoutManager

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

the class CyclingOutputContainerLayoutManagerSerializerTest method setUp.

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

Example 2 with CyclingOutputContainerLayoutManager

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

the class CyclingOutputContainerLayoutManagerDeserializerTest method deserialize_resultObjectHasPeriod.

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

Aggregations

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