public void When_Solve_SLE() { // Arrange Matrix A = new Matrix(3, 3); A.Elem[0][0] = 2; A.Elem[0][1] = 3; A.Elem[0][2] = -1; A.Elem[1][0] = 1; A.Elem[1][1] = -2; A.Elem[1][2] = 1; A.Elem[2][0] = 1; A.Elem[2][1] = 0; A.Elem[2][2] = 2; Vector F = new Vector(3); F.Elem[0] = 9; F.Elem[1] = 3; F.Elem[2] = 2; LUDecomposition lu = new LUDecomposition(); // Act Vector luRes = lu.StartSolver(A, F); Vector gaussRes = Gauss.StartSolver(A, F); // Assert Assert.That(A * luRes == F); Assert.That(A * gaussRes == F); }