public void test_AlphaEstimateSingle_return_correct_value() { /*lm(testList ~ testList2) returns β0 = 6.8778. Calculated with R*/ Assert.AreEqual(6.8778, Math.Round(Regression.AlphaEstimateSingle(testList, testList2), 4)); Assert.AreNotEqual(6.8779, Math.Round(Regression.AlphaEstimateSingle(testList, testList2), 4)); }
public void test_AlphaEstimateSingle_different_counts_throws_MathError() { testList.Add(1); Assert.Throws <MathError>(() => Regression.AlphaEstimateSingle(testList2, testList)); testList.RemoveAt(testList.Count - 1); }
public void test_AlphaEstimateSingle_null_list_throws_MathError() { Assert.Throws <MathError>(() => Regression.AlphaEstimateSingle(null, testList)); }