Ejemplo n.º 1
0
        public void Can_deserialize_bitarray_bitvector(bool[] value, string expectedByteString, byte[] expectedHashTreeRoot)
        {
            // Arrange
            var encoded      = Bytes.FromHexString(expectedByteString);
            var vectorLength = value.Length;

            // Act
            BitArray decoded = Ssz.DecodeBitvector(encoded, vectorLength);

            // Assert
            BitArray expected = new BitArray(value);

            decoded.ShouldBe(expected);
        }