public void AddArrayOfBytesInBinaryTest() { var baseNumberConvertor = new BaseNumberConvertor(); var firstBytes = new byte[] { 1, 0, 1, 0, 1, 0, 1, 1 }; var secondBytes = new byte[] { 1, 0, 1, 0, 1, 1, 0, 1 }; var correctResult = new byte[] { 1, 0, 1, 0, 1, 1, 0, 0, 0 }; var actualResult = baseNumberConvertor.AdditionBaseBytesArray(firstBytes,secondBytes,2); CollectionAssert.AreEqual(actualResult, correctResult); }
public void AddArrayOfBytesInBaseOctalBaseTest() { var baseNumberConvertor = new BaseNumberConvertor(); var firstBytes = new byte[] {3, 7, 2, 1}; var secondBytes = new byte[] {1, 3, 6, 4}; var correctResult = new byte[] {5, 3, 0, 5}; var actualResult = baseNumberConvertor.AdditionBaseBytesArray(firstBytes, secondBytes, 8); CollectionAssert.AreEqual(actualResult, correctResult); }