Esempio n. 1
0
        public void InsertNumberTests()
        {
            string numberSource = TestContext.DataRow["numberSource"].ToString();
            string numberin     = TestContext.DataRow["numberin"].ToString();
            string i            = TestContext.DataRow["i"].ToString();
            string j            = TestContext.DataRow["j"].ToString();
            string expected     = TestContext.DataRow["resultNumber"].ToString();

            int actualResult = NumbersExtension.InsertNumber(int.Parse(numberSource), int.Parse(numberin), int.Parse(i), int.Parse(j));

            Assert.AreEqual(expected, actualResult.ToString());
        }
Esempio n. 2
0
 public void InsertNumberMethod_InvalidValues_ThrowArgumentException()
 {
     Assert.Throws <ArgumentException>(() => NumbersExtension.InsertNumber(0, 7, 9, 6));
     Assert.Throws <ArgumentException>(() => NumbersExtension.InsertNumber(6, 9, 32, 33));
 }
Esempio n. 3
0
 public int InsertNumberTests(int numberSource, int numberin, int i, int j)
 => NumbersExtension.InsertNumber(numberSource, numberin, i, j);
Esempio n. 4
0
 public void InsertNumberMethod_InvalidValues_ThrowArgumentException()
 {
     NumbersExtension.InsertNumber(0, 7, 9, 6);
     NumbersExtension.InsertNumber(6, 9, 32, 33);
 }