Examples of Mondrian


Examples of org.springframework.data.neo4j.annotation.relatedto.Mondrian

    public void shouldDifferentiateClashingRelationshipTypesWhenTargetTypeEnforcedOnFieldAndCollectionSharingSuperType() throws Exception {
        Square redSquare = squares.save(new Square(RED));
        Rectangle yellowRectangle = rectangles.save(new Rectangle(YELLOW));
        Rectangle blueRectangle = rectangles.save(new Rectangle(BLUE));

        Mondrian mondrian = new Mondrian("Composition with Yellow, Blue and Red");
        mondrian.includes(redSquare);
        mondrian.includes(yellowRectangle, blueRectangle);
        mondrians.save(mondrian);

        assertThat(getRelationshipNames(template, mondrian), is(equalTo(asSet("includes"))));
        mondrian = mondrians.findOne(mondrian.getId());
        assertThat(mondrian.getQuadrilaterals(), is(equalTo((Iterable) asSet(redSquare, yellowRectangle, blueRectangle))));
        assertThat(mondrian.getSquare(), is(equalTo(redSquare)));
        assertThat(mondrian.getRectangles(), is(equalTo(asSet(yellowRectangle, blueRectangle))));
    }
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.