Examples of extractEntities()


Examples of org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor.extractEntities()

        when(stepScopeB2.getScoreDirector()).thenReturn(scoreDirector);
        entitySelector.stepStarted(stepScopeB2);
        assertAllCodesOfEntitySelector(entitySelector, "f1", "f2", "f3");
        entitySelector.stepEnded(stepScopeB2);

        when(entityDescriptor.extractEntities(workingSolution)).thenReturn(Arrays.<Object>asList(
                new TestdataEntity("e1"), new TestdataEntity("e2"), new TestdataEntity("e3")));
        when(scoreDirector.getWorkingEntityListRevision()).thenReturn(9L);
        when(scoreDirector.isWorkingEntityListDirty(8L)).thenReturn(true);
        when(scoreDirector.isWorkingEntityListDirty(9L)).thenReturn(false);
View Full Code Here

Examples of org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor.extractEntities()

    public void runRandomWithoutEntityListDirtyAndMinimumCacheType(SelectionCacheType cacheType) {
        TestdataSolution workingSolution = new TestdataSolution();
        final List<Object> entityList = Arrays.<Object>asList(
                new TestdataEntity("e1"), new TestdataEntity("e2"), new TestdataEntity("e3"));
        EntityDescriptor entityDescriptor = mock(EntityDescriptor.class);
        when(entityDescriptor.extractEntities(workingSolution)).thenReturn(entityList);
        InnerScoreDirector scoreDirector = mock(InnerScoreDirector.class);
        when(scoreDirector.getWorkingSolution()).thenReturn(workingSolution);
        when(scoreDirector.getWorkingEntityListRevision()).thenReturn(7L);
        when(scoreDirector.isWorkingEntityListDirty(7L)).thenReturn(false);
        FromSolutionEntitySelector entitySelector = new FromSolutionEntitySelector(entityDescriptor, cacheType, true);
View Full Code Here

Examples of org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor.extractEntities()

    @Test
    public void randomWithEntityListDirty() {
        TestdataSolution workingSolution = new TestdataSolution();
        EntityDescriptor entityDescriptor = mock(EntityDescriptor.class);
        when(entityDescriptor.extractEntities(workingSolution)).thenReturn(Arrays.<Object>asList(
                new TestdataEntity("e1"), new TestdataEntity("e2"), new TestdataEntity("e3")));
        InnerScoreDirector scoreDirector = mock(InnerScoreDirector.class);
        when(scoreDirector.getWorkingSolution()).thenReturn(workingSolution);
        when(scoreDirector.getWorkingEntityListRevision()).thenReturn(7L);
        when(scoreDirector.isWorkingEntityListDirty(7L)).thenReturn(false);
View Full Code Here

Examples of org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor.extractEntities()

        when(stepScopeA1.getScoreDirector()).thenReturn(scoreDirector);
        entitySelector.stepStarted(stepScopeA1);
        assertCodesOfNeverEndingOfEntitySelector(entitySelector, 3L, "e2", "e1", "e1", "e3");
        entitySelector.stepEnded(stepScopeA1);

        when(entityDescriptor.extractEntities(workingSolution)).thenReturn(Arrays.<Object>asList(
                new TestdataEntity("f1"), new TestdataEntity("f2"), new TestdataEntity("f3")));
        when(scoreDirector.getWorkingEntityListRevision()).thenReturn(8L);
        when(scoreDirector.isWorkingEntityListDirty(7L)).thenReturn(true);
        when(scoreDirector.isWorkingEntityListDirty(8L)).thenReturn(false);
View Full Code Here

Examples of org.optaplanner.core.impl.domain.entity.descriptor.EntityDescriptor.extractEntities()

        when(stepScopeB2.getScoreDirector()).thenReturn(scoreDirector);
        entitySelector.stepStarted(stepScopeB2);
        assertCodesOfNeverEndingOfEntitySelector(entitySelector, 3L, "f2");
        entitySelector.stepEnded(stepScopeB2);

        when(entityDescriptor.extractEntities(workingSolution)).thenReturn(Arrays.<Object>asList(
                new TestdataEntity("e1"), new TestdataEntity("e2"), new TestdataEntity("e3")));
        when(scoreDirector.getWorkingEntityListRevision()).thenReturn(9L);
        when(scoreDirector.isWorkingEntityListDirty(8L)).thenReturn(true);
        when(scoreDirector.isWorkingEntityListDirty(9L)).thenReturn(false);
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.