public void SetUp() { _network = new NetworkBuilder().Setup(); _outputErrorCalculatorMock = new Mock <IOutputUnitErrorCalculator>(); _outputErrorCalculatorMock.Setup(c => c.CalculateOutputError(IdealValue1, _network.Output1Activation, _network.Output1Derivative)).Returns(Output1ExpectedError); _outputErrorCalculatorMock.Setup(c => c.CalculateOutputError(IdealValue2, _network.Output2Activation, _network.Output2Derivative)).Returns(Output2ExpectedError); _hiddenErrorCalculatorMock = new Mock <IHiddenUnitErrorCalculator>(); _hiddenErrorCalculatorMock.Setup(c => c.CalculateHiddenError(It.IsAny <IEnumerable <double> >(), It.IsAny <IEnumerable <double> >(), _network.Hidden1Activation, _network.Hidden1Derivative)).Returns(Hidden1ExpectedError); _hiddenErrorCalculatorMock.Setup(c => c.CalculateHiddenError(It.IsAny <IEnumerable <double> >(), It.IsAny <IEnumerable <double> >(), _network.Hidden2Activation, _network.Hidden2Derivative)).Returns(Hidden2ExpectedError); _backPropagator = new ErrorValueBackPropagator(_network.GetNetwork(), _outputErrorCalculatorMock.Object, _hiddenErrorCalculatorMock.Object); _outputUnits = _network.GetOutputs(); _hiddenUnits = _network.GetHidden(); _idealValues = new List <double> { IdealValue1, IdealValue2 }; }