Ejemplo n.º 1
0
        public void Should_LowerUpperFactorization_ForStandardInput()
        {
            //arrange
            int dimensions = 2;

            double[] ratings        = new double[] { 0.5, 0.5 };
            double[] expectedOutput = new double[] { 0.25, 0.25 };
            IJsonSerializationProvider jsonSerializationProvider = A.Fake <IJsonSerializationProvider>();
            IMatrixProvider            matrixProvider            = new MatrixProvider(jsonSerializationProvider, dimensions);

            //act
            matrixProvider.SerializeToJson();
            IEnumerable <double> actualOutput = matrixProvider.LowerUpperFactorizeAndSolve(ratings);

            //assert
            actualOutput.Should().BeEquivalentTo(expectedOutput);
        }