Package org.andromda.core.mapping

Examples of org.andromda.core.mapping.Mappings.addMapping()


        mapping1.setTo(TO_1);
        mapping1.addFrom(FROM_1);
        mapping1.addFrom(FROM_2);
        mapping1.addFrom(FROM_3);
        mapping1.addFrom(FROM_4);
        mappings1.addMapping(mapping1);
        TypeMappings typeMappings1 = TypeMappings.getInstance(mappings1);

        // make sure the to == from when passing in a mappings1 that don't exist
        assertNotNull(typeMappings1.getTo(NOT_MAPPED_1));
        assertEquals(NOT_MAPPED_1, typeMappings1.getTo(NOT_MAPPED_1));
View Full Code Here


        Mappings mappings2 = new Mappings();
        Mapping mapping2 = new Mapping();
        mapping2.setTo(TO_2);
        mapping2.addFrom(FROM_5);
        mappings2.addMapping(mapping2);
        TypeMappings typeMappings2 = TypeMappings.getInstance(mappings2);
        typeMappings2.setArraySuffix(ARRAY_SUFFIX);

        assertEquals(TO_2, typeMappings2.getTo(FROM_5));
        assertEquals(TO_2 + ARRAY_SUFFIX, typeMappings2.getTo(FROM_5 + ARRAY_SUFFIX));
View Full Code Here

        Mappings mappings3 = new Mappings();
        Mapping mapping3 = new Mapping();
        mapping3.setTo(TO_3);
        mapping3.addFrom(FROM_6);
        mappings3.addMapping(mapping3);
        TypeMappings typeMappings3 = TypeMappings.getInstance(mappings3);
        // make sure whitespace isn't deleted, only trimmed (Java generics would fail compilation otherwise for example)
        assertEquals(
            TO_3,
            typeMappings3.getTo(FROM_6));
View Full Code Here

        mapping1.setTo(TO_1);
        mapping1.addFrom(FROM_1);
        mapping1.addFrom(FROM_2);
        mapping1.addFrom(FROM_3);
        mapping1.addFrom(FROM_4);
        mappings1.addMapping(mapping1);

        // make sure the to == from when passing in a mappings1 that don't exist
        assertNotNull(mappings1.getTo(NOT_MAPPED_1));
        assertEquals(
            NOT_MAPPED_1,
View Full Code Here

        Mappings mappings2 = new Mappings();
        Mapping mapping2 = new Mapping();
        mapping2.setTo(TO_2);
        mapping2.addFrom(FROM_5);
        mappings2.addMapping(mapping2);
        assertEquals(
            TO_2,
            mappings2.getTo(FROM_5));

        Mappings mappings3 = new Mappings();
View Full Code Here

        Mappings mappings3 = new Mappings();
        Mapping mapping3 = new Mapping();
        mapping3.setTo(TO_3);
        mapping3.addFrom(FROM_6);
        mappings3.addMapping(mapping3);
        // make sure whitespace isn't deleted, only trimmed (Java generics would fail compilation otherwise for example)
        assertEquals(
            TO_3,
            mappings3.getTo(FROM_6));
    }
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.