Exemplo n.º 1
0
        public void SpecialBitInsertionMethod_InvalidNumbersOfBitsLessthanZero_ArgumentNullException()
        {
            int numberSource = 7;
            int numberIn     = 7;
            int i            = -1;
            int j            = -1;

            Assert.Throws <ArgumentOutOfRangeException>(() => Int32Extension.SpecialBitInsertion(numberSource, numberIn, i, j));
        }
Exemplo n.º 2
0
        public void SpecialBitInsertionMethod_InvalidNumbersOfBits_iMoreThanj_ArgumentException()
        {
            int numberSource = 7;
            int numberIn     = 7;
            int i            = 7;
            int j            = 5;

            Assert.Throws <ArgumentException>(() => Int32Extension.SpecialBitInsertion(numberSource, numberIn, i, j));
        }
Exemplo n.º 3
0
 public int SpecialBitInsertionMethod(int numberSource, int numberIn, int i, int j)
 {
     return(Int32Extension.SpecialBitInsertionV2(numberSource, numberIn, i, j));
 }