Class HardMediumSoftScoreVerifier<Solution_>
- java.lang.Object
-
- org.optaplanner.test.impl.score.AbstractScoreVerifier<Solution_>
-
- org.optaplanner.test.impl.score.buildin.hardmediumsoft.HardMediumSoftScoreVerifier<Solution_>
-
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotation
public class HardMediumSoftScoreVerifier<Solution_> extends AbstractScoreVerifier<Solution_>
To assert the constraints of aSolverFactorythat uses aHardMediumSoftScore. If you're usingConstraintStreams, useConstraintVerifierinstead.
-
-
Field Summary
-
Fields inherited from class org.optaplanner.test.impl.score.AbstractScoreVerifier
scoreDirectorFactory
-
-
Constructor Summary
Constructors Constructor Description HardMediumSoftScoreVerifier(SolverFactory<Solution_> solverFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidassertHardWeight(String constraintName, int expectedWeight, Solution_ solution)Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.voidassertHardWeight(String constraintPackage, String constraintName, int expectedWeight, Solution_ solution)Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.voidassertMediumWeight(String constraintName, int expectedWeight, Solution_ solution)Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.voidassertMediumWeight(String constraintPackage, String constraintName, int expectedWeight, Solution_ solution)Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.voidassertSoftWeight(String constraintName, int expectedWeight, Solution_ solution)Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.voidassertSoftWeight(String constraintPackage, String constraintName, int expectedWeight, Solution_ solution)Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.-
Methods inherited from class org.optaplanner.test.impl.score.AbstractScoreVerifier
assertWeight
-
-
-
-
Constructor Detail
-
HardMediumSoftScoreVerifier
public HardMediumSoftScoreVerifier(SolverFactory<Solution_> solverFactory)
- Parameters:
solverFactory- never null, theSolverFactoryof which you want to test the constraints.
-
-
Method Detail
-
assertHardWeight
public void assertHardWeight(String constraintName, int expectedWeight, Solution_ solution)
Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.- Parameters:
constraintName- never null, the name of the constraintexpectedWeight- the total weight for all matches of that 1 constraintsolution- never null, the actualPlanningSolution
-
assertHardWeight
public void assertHardWeight(String constraintPackage, String constraintName, int expectedWeight, Solution_ solution)
Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.- Parameters:
constraintPackage- sometimes null. When null,constraintNamefor thescoreLevelmust be unique.constraintName- never null, the name of the constraintexpectedWeight- the total weight for all matches of that 1 constraintsolution- never null, the actualPlanningSolution
-
assertMediumWeight
public void assertMediumWeight(String constraintName, int expectedWeight, Solution_ solution)
Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.- Parameters:
constraintName- never null, the name of the constraintexpectedWeight- the total weight for all matches of that 1 constraintsolution- never null, the actualPlanningSolution
-
assertMediumWeight
public void assertMediumWeight(String constraintPackage, String constraintName, int expectedWeight, Solution_ solution)
Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.- Parameters:
constraintPackage- sometimes null. When null,constraintNamefor thescoreLevelmust be unique.constraintName- never null, the name of the constraintexpectedWeight- the total weight for all matches of that 1 constraintsolution- never null, the actualPlanningSolution
-
assertSoftWeight
public void assertSoftWeight(String constraintName, int expectedWeight, Solution_ solution)
Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.- Parameters:
constraintName- never null, the name of the constraintexpectedWeight- the total weight for all matches of that 1 constraintsolution- never null, the actualPlanningSolution
-
assertSoftWeight
public void assertSoftWeight(String constraintPackage, String constraintName, int expectedWeight, Solution_ solution)
Assert that the constraint ofPlanningSolutionhas the expected weight for that score level.- Parameters:
constraintPackage- sometimes null. When null,constraintNamefor thescoreLevelmust be unique.constraintName- never null, the name of the constraintexpectedWeight- the total weight for all matches of that 1 constraintsolution- never null, the actualPlanningSolution
-
-