public void Validate_IfQuadraticRegularizationNegative_Throw()
{
const double bad = -0.1;
var trainer = new SimpleGradientTrainer { LearningRate = 0.1, NumEpochs = 100, QuadraticRegularization = bad };
Action action = () => trainer.Validate();
action.ShouldThrow<NeuralNetworkException>()
.WithMessage($"*Property QuadraticRegularization cannot be negative; was {bad}*");
}