Package org.amplafi.flow.flowproperty

Examples of org.amplafi.flow.flowproperty.FlowPropertyProvider


        flowTranslatorResolver.initializeService();
        return flowTranslatorResolver;
    }
    @Test
    public void testResolvingClassWithCollections() {
        FlowPropertyProvider flowPropertyProvider = null;

        DataClassDefinitionImpl dataClassDefinition = new DataClassDefinitionImpl(Long.class, Set.class);
        getFlowTranslatorResolver().resolve("", dataClassDefinition, true);
        assertEquals(dataClassDefinition.getDataClass(), Set.class);
        assertNotNull(dataClassDefinition.getFlowTranslator());
View Full Code Here


        String serializedResult = (String) dataClassDefinition.serialize(null, result);
        assertEquals(serializedResult, "[34,45,67]");
    }
    @Test
    public void testResolvingClassWithMaps() {
        FlowPropertyProvider flowPropertyProvider = null;

        DataClassDefinitionImpl dataClassDefinition = DataClassDefinitionImpl.map(Long.class, String.class, List.class);
        getFlowTranslatorResolver().resolve("", dataClassDefinition, true);

        assertEquals(dataClassDefinition.getDataClass(), Map.class);
View Full Code Here

        getFlowTranslatorResolver().resolve("", definition);
        List<URI> list = Arrays.asList(new URI("http://foo.com"), new URI("http://gg.gov"));
        String strV =definition.serialize(list);
        assertEquals(strV, "[\"http://foo.com\",\"http://gg.gov\"]");

        FlowPropertyProvider flowPropertyProvider = null;
        List<URI> result = definition.parse(flowPropertyProvider, strV);
        assertTrue(list.containsAll(result));
        assertTrue(result.containsAll(list));
    }
View Full Code Here

        FlowPropertyDefinitionImpl definition = new FlowPropertyDefinitionImpl(URI, URI.class, FlowActivityPhase.advance, Set.class);
        getFlowTranslatorResolver().resolve("", definition);
        Set<URI> set = new LinkedHashSet<URI>(Arrays.asList(new URI("http://foo.com"), new URI("http://gg.gov")));
        String strV =definition.serialize(set);
        assertEquals(strV, "[\"http://foo.com\",\"http://gg.gov\"]");
        FlowPropertyProvider flowPropertyProvider = null;
        Set<URI> result =(Set<URI>) definition.parse(flowPropertyProvider, strV);
        assertTrue(set.containsAll(result));
        assertTrue(set.containsAll(set));
    }
View Full Code Here

        Map<String, URI> map = new LinkedHashMap<String, URI>();
        map.put("first", new URI("http://foo.com"));
        map.put("second", new URI("http://gg.gov"));
        String strV =definition.serialize(map);
        assertEquals(strV, "{\"first\":\"http://foo.com\",\"second\":\"http://gg.gov\"}");
        FlowPropertyProvider flowPropertyProvider = null;
        Map<String, URI> result = (Map<String,URI>) definition.parse(flowPropertyProvider, strV);
        assertTrue(result.equals(map));
    }
View Full Code Here

        FlowPropertyDefinitionImplementor flowPropertyDefinition = createFlowPropertyDefinition();
        DataClassDefinition dataClassDefinition = flowPropertyDefinition.getDataClassDefinition();

        String actual = flowPropertyDefinition.serialize(object);

        FlowPropertyProvider flowPropertyProvider = null;
        Object deserialized = createFlowTranslator().deserialize(flowPropertyProvider, flowPropertyDefinition, dataClassDefinition, actual);

        compareResults(object, expectedSerialize, actual, deserialized);
    }
View Full Code Here

TOP

Related Classes of org.amplafi.flow.flowproperty.FlowPropertyProvider

Copyright © 2018 www.massapicom. 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.