コード例 #1
0
        public void InsertNumber_JGreaterThan31_Exception()
        {
            int i = 10, j = 34;
            int numberSource = 5, numberIn = 10;

            NumericMethods.InsertNumber(numberSource, numberIn, i, j);
        }
コード例 #2
0
        public void InsertNumber_ILowerThanZero_Exception()
        {
            int i = -4, j = 3;
            int numberSource = 5, numberIn = 10;

            NumericMethods.InsertNumber(numberSource, numberIn, i, j);
        }
コード例 #3
0
        public void InsertNumber_JGreaterThan31_Exception()
        {
            int i = 10, j = 34;
            int numberSource = 5, numberIn = 10;

            Assert.Throws <ArgumentOutOfRangeException>(() => NumericMethods.InsertNumber(numberSource, numberIn, i, j));
        }
コード例 #4
0
        public void InsertNumber_ILowerThanZero_Exception()
        {
            int i = -4, j = 3;
            int numberSource = 5, numberIn = 10;

            Assert.Throws <ArgumentOutOfRangeException>(() => NumericMethods.InsertNumber(numberSource, numberIn, i, j));
        }
コード例 #5
0
        public void InsertNumber_Parameters_EqualToResult(int numberSource, int numberIn, int i, int j, int r)
        {
            int result = NumericMethods.InsertNumber(numberSource, numberIn, i, j);

            Assert.AreEqual(r, result);
        }