public void InsertBits_InvalidIndexes_ArgumentOutOfRangeException(int firstNumber, int secondNumber, int i, int j) { Assert.Throws <ArgumentOutOfRangeException>(() => BitsReplacement.InsertBits(firstNumber, secondNumber, i, j)); }
public void InsertBits_EndingIndexIsGreaterThanStartingIndex_ArgumentException() { Assert.Throws <ArgumentException>(() => BitsReplacement.InsertBits(1, 1, 2, 1)); }
public void InsertBits_ValidCases_NumberWithReplacedBits(int firstNumber, int secondNumber, int i, int j, int expectedResult) { int result = BitsReplacement.InsertBits(firstNumber, secondNumber, i, j); Assert.AreEqual(result, expectedResult); }