示例#1
0
        public void CheckList()
        {
            var size    = Rand.Default.Range(1, 8);
            var intData = new int[size];

            for (int i = 0; i < intData.Length; i++)
            {
                intData[i] = Rand.Default.RandInt();
            }
            var bitField      = new BitField(intData);
            var json          = JsonUtil.ToJson(bitField);
            var checkBitField = JsonUtil.ToObject <BitField>(json);

            Assert.IsTrue(bitField.Equals(checkBitField));
        }
示例#2
0
        public override bool Equals(object obj)
        {
            var bitfieldMessage = obj as BitfieldMessage;

            return(bitfieldMessage != null && _bitField.Equals(bitfieldMessage._bitField));
        }