Package org.amplafi.flow.flowproperty

Examples of org.amplafi.flow.flowproperty.DataClassDefinitionImpl.deserialize()


        assertEquals(elementDataClassDefinition.getDataClass(), Long.class);
        assertNotNull(elementDataClassDefinition.getFlowTranslator());
        assertTrue(elementDataClassDefinition.getFlowTranslator() instanceof LongFlowTranslator, elementDataClassDefinition.getFlowTranslator().toString());

        // verify that the resolved result can do something useful
        Set<Long> result = dataClassDefinition.deserialize(flowPropertyProvider, null, "[34,45,67]");
        assertTrue(result.containsAll(Arrays.asList(34L, 45L, 67L)));
        assertEquals(result.size(), 3);

        String serializedResult = (String) dataClassDefinition.serialize(null, result);
        assertEquals(serializedResult, "[34,45,67]");
View Full Code Here


        List<String> expected3 = Arrays.asList("foo3", "bar3");
        map.put(new Long(3), expected3);

        String serializedResult = (String) dataClassDefinition.serialize(null, map);
        assertEquals(serializedResult, "{\"34\":[\"foo34\",\"bar34\"],\"3\":[\"foo3\",\"bar3\"]}");
        Map<Long, List<String>> reMap = dataClassDefinition.deserialize(flowPropertyProvider, null, serializedResult);
        assertEquals(reMap.size(), 2);
        List<String> set34 = reMap.get(new Long(34));
        List<String> set3 = reMap.get(new Long(3));
        assertTrue(set34.containsAll(expected34));
        assertTrue(set3.containsAll(expected3));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.