Пример #1
0
        public void TestSinWithNaN()
        {
            double angleInRad = double.NaN;
            var    calc       = new CSharpCalculator.Calculator();

            Assert.AreEqual(double.NaN, calc.Sin(angleInRad));
        }
Пример #2
0
        public void TestSubFromZero()
        {
            var calc     = new CSharpCalculator.Calculator();
            var toParse1 = double.Parse(TestSub.minuend.ToString());
            var toParse2 = double.Parse(TestSub.subtrahend.ToString());

            Assert.AreEqual(toParse2 * -1, calc.Sub(toParse1, toParse2));
        }
Пример #3
0
        public void TestCosWithZero()
        {
            var calc = new CSharpCalculator.Calculator();

            Assert.AreEqual(1, calc.Cos(TestCos.angleInRadian));
        }
Пример #4
0
 public MainWindow()
 {
     calculator = new Calculator();
     InitializeComponent();
 }