public void ArcsineTest(double value, double expected) { IOoneCalculator calculator = OneArgumentFactory.CreateCalculator("Arcsine"); double result = calculator.Calculate(value); Assert.AreEqual(expected, result, 0.01); }
private void button1_Click_1(object sender, EventArgs e) { double firstNumber = Convert.ToDouble(textBox1.Text); IOoneCalculator calculator = OneArgumentFactory.CreateCalculator(((Button)sender).Name); double answerDigit = calculator.Calculate(firstNumber); textBox3.Text = answerDigit.ToString(); }