Package org.optaplanner.core.impl.testdata.domain.extended

Examples of org.optaplanner.core.impl.testdata.domain.extended.TestdataExtendedSolution


        TestdataExtendedEntity b = new TestdataExtendedEntity("b", val1, "extraObjectOnEntity");
        TestdataExtendedEntity c = new TestdataExtendedEntity("c", val3);
        TestdataExtendedEntity d = new TestdataExtendedEntity("d", val3, c);
        c.setExtraObject(d);

        TestdataExtendedSolution original = new TestdataExtendedSolution("solution", "extraObjectOnSolution");
        List<TestdataValue> valueList = Arrays.asList(val1, val2, val3);
        original.setValueList(valueList);
        List<TestdataEntity> originalEntityList = Arrays.<TestdataEntity>asList(a, b, c, d);
        original.setEntityList(originalEntityList);

        TestdataExtendedSolution clone = (TestdataExtendedSolution) cloner.cloneSolution(original);

        assertNotSame(original, clone);
        assertCode("solution", clone);
        assertEquals("extraObjectOnSolution", clone.getExtraObject());
        assertSame(valueList, clone.getValueList());

        List<TestdataEntity> cloneEntityList = clone.getEntityList();
        assertNotSame(originalEntityList, cloneEntityList);
        assertEquals(4, cloneEntityList.size());
        TestdataExtendedEntity cloneA = (TestdataExtendedEntity) cloneEntityList.get(0);
        TestdataExtendedEntity cloneB = (TestdataExtendedEntity) cloneEntityList.get(1);
        TestdataExtendedEntity cloneC = (TestdataExtendedEntity) cloneEntityList.get(2);
View Full Code Here

TOP

Related Classes of org.optaplanner.core.impl.testdata.domain.extended.TestdataExtendedSolution

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.