Class AbstractScoreVerifier<Solution_>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.optaplanner.core.impl.score.director.InnerScoreDirectorFactory<Solution_,​?> scoreDirectorFactory
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      AbstractScoreVerifier​(org.optaplanner.core.api.solver.SolverFactory<Solution_> solverFactory, Class<? extends org.optaplanner.core.api.score.Score<?>> expectedScoreClass)
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • Field Detail

      • scoreDirectorFactory

        protected final org.optaplanner.core.impl.score.director.InnerScoreDirectorFactory<Solution_,​?> scoreDirectorFactory
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Constructor Detail

      • AbstractScoreVerifier

        public AbstractScoreVerifier​(org.optaplanner.core.api.solver.SolverFactory<Solution_> solverFactory,
                                     Class<? extends org.optaplanner.core.api.score.Score<?>> expectedScoreClass)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Parameters:
        solverFactory - never null, the SolverFactory of which you want to test the constraints.
        expectedScoreClass - never null, used to fail fast if a SolverFactory with another Score type is used.
    • Method Detail

      • assertWeight

        protected void assertWeight​(String constraintPackage,
                                    String constraintName,
                                    int scoreLevel,
                                    Number expectedWeight,
                                    Solution_ solution)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Assert that the constraint of PlanningSolution has the expected weight for that score level.
        Parameters:
        constraintPackage - sometimes null. When null, constraintName for the scoreLevel must be unique.
        scoreLevel - at least 0
        constraintName - never null, the name of the constraint
        expectedWeight - never null, the total weight for all matches of that 1 constraint
        solution - never null