private void LearningTest(bool signal, double expected) { var neuron = Substitute.For <ISender>(); neuron.Signal.Returns(signal); neuron.Index.Returns(0); var outputNeuron = new OutputNeuron( 0, new[] { 0.5d }, new[] { neuron }); outputNeuron.Learn(0.01d); outputNeuron.WeightingFactors[0].Should().Be(expected); }