コード例 #1
0
ファイル: Sample1.cs プロジェクト: zhoucq/UnitTestsSamples
        public void TestSubtract()
        {
            MathsHelper helper = new MathsHelper();
            int         result = helper.Subtract(20, 10);

            Assert.AreEqual(10, result);
        }
コード例 #2
0
ファイル: Sample1.cs プロジェクト: zhoucq/UnitTestsSamples
        public void TestAdd()
        {
            MathsHelper helper = new MathsHelper();
            int         result = helper.Add(20, 10);

            Assert.AreEqual(30, result);
        }
コード例 #3
0
ファイル: Sample1.cs プロジェクト: zhoucq/UnitTestsSamples
        public void TestSubtract(int p1, int p2, int result)
        {
            MathsHelper helper = new MathsHelper();

            Assert.AreEqual(helper.Subtract(p1, p2), result);
        }
コード例 #4
0
ファイル: Sample1.cs プロジェクト: zhoucq/UnitTestsSamples
        public void TestAdd(int p1, int p2, int result)
        {
            MathsHelper helper = new MathsHelper();

            Assert.AreEqual(helper.Add(p1, p2), result);
        }