public void DivisionArrayOfByteInOctalBaseWhenTheArrayAreEqualsTest() { var baseNumberConvertor = new BaseNumberConvertor(); var firstBytes = new byte[] { 2, 3, 7 }; var secondBytes = new byte[] { 2, 3, 7 }; var correctResult = new byte[] { 1 }; var actualResult = baseNumberConvertor.DivisionBaseBytesArray(firstBytes, secondBytes, 8); CollectionAssert.AreEqual(actualResult, correctResult); }
public void DivisionArrayOfByteWhenFirstArrayIsSmallerThanSecondTest() { var baseNumberConvertor = new BaseNumberConvertor(); var firstBytes = new byte[] { 2, 3 }; var secondBytes = new byte[] { 2, 5 }; var correctResult = new byte[] { 0 }; var actualResult = baseNumberConvertor.DivisionBaseBytesArray(firstBytes, secondBytes, 8); CollectionAssert.AreEqual(actualResult, correctResult); }
public void DivisionArrayOfByteInBinaryTest() { var baseNumberConvertor = new BaseNumberConvertor(); var firstBytes = new byte[] {1, 1, 1, 0, 0, 1, 1}; var secondBytes = new byte[] {1, 1, 1}; var correctResult = new byte[] {1, 0, 0, 0, 0}; var actualResult = baseNumberConvertor.DivisionBaseBytesArray(firstBytes, secondBytes, 2); CollectionAssert.AreEqual(actualResult, correctResult); }