Exemplo n.º 1
0
        public void GetDependencyMatrix_BeforeExecution_ShouldThrow()
        {
            double[][] matrix =
            {
                new double[] { 0, 1, 0 },
                new double[] { 1, 0, 1 },
                new double[] { 0, 1, 0 }
            };

            var network = new Network(matrix);

            var alg = new DependencyAlgorithm(network);

            Assert.Throws <AlgorithmNotExecuted>(() => alg.GetDependencyMatrix());
        }
Exemplo n.º 2
0
        public void GetDependencyMatrix_AfterExecution_ShouldReturnMatrixDameSizaAsInput()
        {
            double[][] matrix =
            {
                new double[] { 0, 1, 0 },
                new double[] { 1, 0, 1 },
                new double[] { 0, 1, 0 }
            };

            var network = new Network(matrix);

            var alg = new DependencyAlgorithm(network);

            alg.Execute();

            Assert.Equal(3, alg.GetDependencyMatrix().Length);
        }