public void TestSolveShouldThrowWrongDALOnLoad() { BL logic = new BL(); mock.coefs = new Double[3] { 1, 4, 20 }; FieldInfo fi = logic.GetType().GetField("_dal", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); fi.SetValue(logic, new DALError()); logic.Solve(); }
public void TestSolveHasSameRoots() { BL logic = new BL(); mock.coefs = new Double[3] { 1, 4, 4 }; FieldInfo fi = logic.GetType().GetField("_dal", BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); fi.SetValue(logic, mock); logic.Solve(); Assert.AreEqual("-2;-2;True", mock.results); }