コード例 #1
0
        public void InsertNumber_NormalInsert_ReturnResult2()
        {
            int expected = 120;
            int result   = Inserter.InsertNumber(8, 15, 3, 8);

            Assert.AreEqual(expected, result);
        }
コード例 #2
0
        public void InsertNumberTest_NegativeIndex_ArgumentException()
        {
            int i = 5;
            int j = 2;

            Inserter.InsertNumber(8, 15, i, j);
        }
コード例 #3
0
        public void InsertNumber_NormalInsert_ReturnResult1()
        {
            int expected = 19;
            int result   = Inserter.InsertNumber(7, 12, 2, 4);

            Assert.AreEqual(expected, result);
        }
コード例 #4
0
        public void InsertNumberTest_TwoIntNumbers_ConvertedNumber()
        {
            int actual   = Inserter.InsertNumber(8, 15, 3, 8);
            int expected = 120;

            Assert.AreEqual(expected, actual);
        }
コード例 #5
0
        public void InsertNumber_NormalInsert_ReturnResult3()
        {
            int expected = 15;
            int result   = Inserter.InsertNumber(15, 15, 0, 0);

            Assert.AreEqual(expected, result);
        }
コード例 #6
0
        public void InsertNumberMethod_CorrectData_ReturnNewIntegerNumber()
        {
            int expectedNumber = 120;

            int actNumber = Inserter.InsertNumber(8, 15, 3, 8);

            Assert.AreEqual(expectedNumber, actNumber);
        }
コード例 #7
0
 public void InsertNumber_ThrowException_WrongInterval()
 {
     Inserter.InsertNumber(7, 12, 9, 6);
 }
コード例 #8
0
 public static int InsertNumberTest(int firstNumber, int secondNumber, int i, int j)
 {
     return(Inserter.InsertNumber(firstNumber, secondNumber, i, j));
 }
コード例 #9
0
 public void InsertNumberMethod_IndexArgsBiggerThanRange_ArgumentOutOfRangeException()
 {
     Inserter.InsertNumber(8, 15, 32, 32);
 }
コード例 #10
0
 public void InsertNumberMethod_FirstIndBiggerThanSecondInd_ArgumentOutOfRangeException()
 {
     Inserter.InsertNumber(8, 15, 10, 5);
 }
コード例 #11
0
 public void InsertNumber_ThrowArgumentException()
 {
     NUnit.Framework.Assert.Throws <ArgumentException>(() => Inserter.InsertNumber(8, 12, 4, 2));
 }
コード例 #12
0
 public void InsertNumberMethod_IndexArgsBiggerThanRange_ArgumentOutOfRangeException()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => Inserter.InsertNumber(8, 15, 32, 32));
 }
コード例 #13
0
 public void InsertNumberMethod_IndexArgsLowerThanZero_ArgumentOutOfRangeException()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => Inserter.InsertNumber(8, 15, -1, -1));
 }
コード例 #14
0
 public void InsertNumberMethod_FirstIndBiggerThanSecondInd_ArgumentOutOfRangeException()
 {
     Assert.Throws <ArgumentOutOfRangeException>(() => Inserter.InsertNumber(8, 15, 10, 5));
 }
コード例 #15
0
 public int InsertNumberMethod_CorrectData_ReturnNewIntegerNumber(int firstNum, int secondNum, int firstInd, int secondInd)
 {
     return(Inserter.InsertNumber(firstNum, secondNum, firstInd, secondInd));
 }
コード例 #16
0
 public static void InsertNumberTest_FirstNumber_SecondNumber_i_j_ArgumentException(int firstNumber, int secondNumber, int i, int j)
 => Assert.Throws <ArgumentException>(() => Inserter.InsertNumber(firstNumber, secondNumber, i, j));
コード例 #17
0
 public int InsertTest(int a, int b, int i, int j)
 {
     return(Inserter.InsertNumber(a, b, i, j));
 }
コード例 #18
0
 public void InsertNumberTest()
 {
     Assert.AreEqual(15, Inserter.InsertNumber(15, 15, 0, 0));
     Assert.AreEqual(9, Inserter.InsertNumber(8, 15, 0, 0));
     Assert.AreEqual(120, Inserter.InsertNumber(8, 15, 3, 8));
 }
コード例 #19
0
 public void InsertNumber_ThrowArgumentOutOfRangeException()
 {
     NUnit.Framework.Assert.Throws <ArgumentOutOfRangeException>(() => Inserter.InsertNumber(8, 12, -4, 2));
     NUnit.Framework.Assert.Throws <ArgumentOutOfRangeException>(() => Inserter.InsertNumber(8, 12, -4, -2));
 }
コード例 #20
0
 public void InsertNumberNegativeNumbersTest()
 {
     Assert.AreEqual(-15, Inserter.InsertNumber(-15, -15, 0, 0));
     Assert.AreEqual(-7, Inserter.InsertNumber(-8, -15, 0, 0));
     Assert.AreEqual(-120, Inserter.InsertNumber(-8, -15, 3, 8));
 }
コード例 #21
0
 public void InsertNumberMethod_IndexArgsLowerThanZero_ArgumentOutOfRangeException()
 {
     Inserter.InsertNumber(8, 15, -1, -1);
 }
コード例 #22
0
 public void InsertNumberArgumentExceptionTest()
 {
     Assert.ThrowsException <ArgumentException>(() => Inserter.InsertNumber(-15, -15, 32, 33));
     Assert.ThrowsException <ArgumentException>(() => Inserter.InsertNumber(-15, -15, -1, -2));
     Assert.ThrowsException <ArgumentException>(() => Inserter.InsertNumber(-15, -15, 8, 3));
 }
コード例 #23
0
 public void InsertNumberBoundaryArgumentsTest()
 {
     Assert.AreEqual(Int32.MinValue + 1, Inserter.InsertNumber(Int32.MinValue, Int32.MaxValue, 0, 0));
     Assert.AreEqual(-8, Inserter.InsertNumber(-8, -15, 31, 31));
     Assert.AreEqual(15, Inserter.InsertNumber(8, 15, 0, 31));
 }
コード例 #24
0
 public int InsertNumberTest(int number1, int number2, int i, int j)
 {
     return(Inserter.InsertNumber(number1, number2, i, j));
 }