Пример #1
0
        public void BitArrayToText() {
            var bitArray = new BitArray(32);

            var bitString = bitArray.ToText();
            Assert.AreEqual(32, bitString.Length);
            Assert.IsFalse(bitString.Contains("1"));
            Assert.IsTrue(bitString.All(c => c == '0'));

            bitString = bitArray.Not().ToText();
            Assert.AreEqual(32, bitString.Length);
            Assert.IsFalse(bitString.Contains("0"));
            Assert.IsTrue(bitString.All(c => c == '1'));
        }