public void WriteWithHashSet()
        {
            const string hexBuffer = "A36A496E74486173685365748201026D4F626A6563744861736853657482A168496E7456616C756501A168496E7456616C7565026D537472696E67486173685365748261616162";

            HashSetObject obj = new HashSetObject
            {
                IntHashSet = new HashSet <int> {
                    1, 2
                },
                ObjectHashSet = new HashSet <IntObject>
                {
                    new IntObject {
                        IntValue = 1
                    },
                    new IntObject {
                        IntValue = 2
                    }
                },
                StringHashSet = new HashSet <string> {
                    "a", "b"
                }
            };

            Helper.TestWrite(obj, hexBuffer);
        }
        public void ReadWithHashSet()
        {
            const string  hexBuffer = "A36A496E74486173685365748201026D4F626A6563744861736853657482A168496E7456616C756501A168496E7456616C7565026D537472696E67486173685365748261616162";
            HashSetObject obj       = Helper.Read <HashSetObject>(hexBuffer);

            Assert.NotNull(obj);

            Assert.NotNull(obj.IntHashSet);
            Assert.Equal(2, obj.IntHashSet.Count);
            Assert.Contains(1, obj.IntHashSet);
            Assert.Contains(2, obj.IntHashSet);

            Assert.NotNull(obj.ObjectHashSet);
            Assert.Equal(2, obj.ObjectHashSet.Count);
            Assert.Contains(new IntObject {
                IntValue = 1
            }, obj.ObjectHashSet);
            Assert.Contains(new IntObject {
                IntValue = 2
            }, obj.ObjectHashSet);

            Assert.NotNull(obj.StringHashSet);
            Assert.Equal(2, obj.StringHashSet.Count);
            Assert.Contains("a", obj.StringHashSet);
            Assert.Contains("b", obj.StringHashSet);
        }