private void button1_Click(object sender, EventArgs e) { string error = ""; double[] result = KvUr.Matching(int.Parse(textBox1.Text), int.Parse(textBox2.Text), int.Parse(textBox3.Text), out error); string resultStr = string.Join("\n", result); MessageBox.Show(resultStr, error); }
public void Test_1__2_6_9() { int a = 2; int b = 6; int c = 9; string actError = ""; string expError = "Нет корней"; double[] expResult = new double[0]; double[] actResult = KvUr.Matching(a, b, c, out actError); Assert.AreEqual(expError, actError, "Полученное сообщение (" + actError + ") об ошибке не совпадают с ожидаемым (" + expError + ")"); Assert.AreEqual(expResult.Length, actResult.Length); for (int i = 0; i < expResult.Length; i++) { Assert.AreEqual(expResult[i], actResult[i]); } }