public void SingleAdditionNeuronInLayerUsingBuilders(decimal val1, decimal val2)
        {
            // Arrange
            var receiverBuilder = new FixedValueBuilder<IEnumerable<ValueStoringNeuron<decimal>>>
            {
                Value = new OutputLayerBuilder<decimal>
                {
                    NumberOfNeurons = 1
                }.Build()
            };
            var layerBuilder = new DelayedSimpleHiddenLayerBuilder<decimal, ValueStoringNeuron<decimal>>
            {
                NumberOfNeurons = 1,
                NextLayerBuilder = receiverBuilder,
                FunctionSource = new ByDefaultConstructorBuilder<DecimalSumFunction>()
            };
            var sut = new OnNextSplittingObserverDecorator<decimal>(new CompositeObserver<decimal>(layerBuilder.Build()));

            // Act
            sut.OnNext(new decimal[] { val1, val2 });

            // Assert
            var result = receiverBuilder.Value.Single().LastValue;
            result.Should().Be(val1 + val2);
        }
        public void TwoToManyAdditionNeuronInLayerUsingBuilders(decimal val1, decimal val2, int neuronCount)
        {
            // Arrange
            var receiverBuilder = new FixedValueBuilder<IEnumerable<ValueStoringNeuron<decimal>>>
            {
                Value = new OutputLayerBuilder<decimal>
                {
                    NumberOfNeurons = neuronCount
                }.Build()
            };
            var hiddenLayerBuilder = new DelayedWrappingHiddenLayerBuilder<decimal, ValueStoringNeuron<decimal>>
            {
                FunctionSource = new ByDefaultConstructorBuilder<DecimalSumFunction>(),
                NextLayer = receiverBuilder
            };
            var inputLayerBuilder = new DelayedSimpleHiddenLayerBuilder<decimal, IObserver<decimal>>
            {
                NumberOfNeurons = 2,
                NextLayerBuilder = hiddenLayerBuilder,
                FunctionSource = new ByDefaultConstructorBuilder<DecimalSumFunction>()
            };
            var sut = new OnNextSplittingObserverDecorator<decimal>(new CompositeObserver<decimal>(inputLayerBuilder.Build()));

            // Act
            sut.OnNext(new decimal[] { val1, val2 });

            // Assert
            var expected = (val1 + val2) * 2;
            receiverBuilder.Value.Select(neuron => neuron.LastValue).Should().OnlyContain(value => value == expected);
        }