public void FailWithWrongArguments6() { LinearEquation l1 = new LinearEquation("2 4 1 36", 4); LinearEquation l2 = new LinearEquation("5 2 1 47", 4); LinearEquation l3 = new LinearEquation("0 0 0 1", 4); SystemOfLinearEquation slu = new SystemOfLinearEquation(3); slu[0] = l1; slu[1] = l2; slu[2] = l3; Assert.ThrowsException <ArgumentException>(() => slu.gauss()); }
public void TestSystem1() { LinearEquation l1 = new LinearEquation("2 4 1 36", 4); LinearEquation l2 = new LinearEquation("5 2 1 47", 4); LinearEquation l3 = new LinearEquation("2 3 4 37", 4); SystemOfLinearEquation slu = new SystemOfLinearEquation(3); slu[0] = l1; slu[1] = l2; slu[2] = l3; double[] x = slu.gauss(); Assert.AreEqual(x[0], 7.0); }