public void TestIsValidComponentsAreMissing() { ClimberConfiguration <TestIntegerEvaluableState, int> config = ClimberConfiguration <TestIntegerEvaluableState, int> .Create(); Assert.IsNotNull(config); Assert.IsFalse(config.IsValid()); }
public void TestCreateFromConfigurationWithDefinedDirection() { ClimberConfiguration <TestIntegerEvaluableState, int> config = ClimberConfiguration <TestIntegerEvaluableState, int> .Create() .GeneratesSuccessorsWith(generator) .ClimbsInDirection(ClimberDirection.Maximize); Assert.IsNotNull(config); Assert.IsTrue(config.IsValid()); }
public void TestCreateFromConfigurationWithCustomComparer() { IComparer <TestIntegerEvaluableState> comparer = new MinimizingComparer <TestIntegerEvaluableState>(); ClimberConfiguration <TestIntegerEvaluableState, int> config = ClimberConfiguration <TestIntegerEvaluableState, int> .Create() .GeneratesSuccessorsWith(generator) .ComparesUsing(comparer); Assert.IsNotNull(config); Assert.IsTrue(config.IsValid()); }
public void TestCreateFromConfigurationWithDefaults() { ClimberConfiguration <TestIntegerEvaluableState, int> config = ClimberConfiguration <TestIntegerEvaluableState, int> .Create() .GeneratesSuccessorsWith(generator); IComparer <TestIntegerEvaluableState> expectedComparer = new MaximizingComparer <TestIntegerEvaluableState>(); Assert.IsNotNull(config); Assert.IsTrue(config.IsValid()); }