public void Prepend_ByteArray_ShouldPrependData_WhenLastBlockFull() { var bitString = new BitString("10010110"); bitString.Prepend(new byte[] { 0xA5 }); Assert.AreEqual(16, bitString.Length); Assert.AreEqual("1010010110010110", bitString.ToBinString()); }
public void Prepend_Bitstring_ShouldPrependData_WhenLastBlockNotFull() { var bitString = new BitString("10010110"); bitString.Prepend(new BitString("11011")); Assert.AreEqual(13, bitString.Length); Assert.AreEqual("1101110010110", bitString.ToBinString()); }
public void Prepend_ByteArray_ShouldDoNothing_WhenNullData() { var bitString = new BitString("11001"); byte[] data = null; bitString.Prepend(data); Assert.AreEqual(5, bitString.Length); Assert.AreEqual("11001", bitString.ToBinString()); }