Exemplo n.º 1
0
 private void PerformActions(double[,] first, double[,] second)
 {
     _view.ShowMatrix(first, "first");
     _view.ShowMatrix(second, "second");
     _view.ShowMatrix(first.AddMatrix(second), "Sum");
     _view.ShowMatrix(first.SubtractMatrix(second), "Subtract");
     _view.ShowMatrix(first.MultiplyByMatrix(second), "Multiply");
 }
        public void SumMatrices_NewMatrix_Test()
        {
            var expected = new[, ]
            {
                { 2D, 4D },
                { 6D, 8D }
            };

            var actual = _first.AddMatrix(_third);

            Assert.IsTrue(IsEqualsArrays(expected, actual));
        }