예제 #1
0
        public void Subtract_operation_success()
        {
            int a      = 54321;
            int b      = 12345;
            var client = new v2.Client(MathJSURL);
            var rs     = client.Send(new Subtract(a, b));

            Assert.AreEqual(a - b, rs.Value);
        }
예제 #2
0
        public void Divide_operation_success()
        {
            int a      = 12345;
            int b      = 321;
            var client = new v2.Client(MathJSURL);
            var rs     = client.Send(new Divide(a, b));

            Assert.AreEqual(System.Math.Round((decimal)a / b, 0), rs.Value);
        }
예제 #3
0
        public void Multiply_operation_success()
        {
            int a      = 123;
            int b      = 123;
            var client = new v2.Client(MathJSURL);
            var rs     = client.Send(new Multiply(a, b));

            Assert.AreEqual(a * b, rs.Value);
        }
예제 #4
0
        public void Add_operation_success()
        {
            int a      = 123;
            int b      = 321;
            var client = new v2.Client(MathJSURL);
            var rs     = client.Send(new Add(a, b));

            Assert.AreEqual(a + b, rs.Value);
        }