Esempio n. 1
0
        public void ReadCap1()
        {
            var mb  = MessageBuilder.Create();
            var dss = mb.CreateObject <DynamicSerializerState>();

            dss.SetStruct(0, 1);
            DeserializerState ds = dss;

            Assert.ThrowsException <ArgumentOutOfRangeException>(() => ds.ReadCap(-1));
            Assert.ThrowsException <InvalidOperationException>(() => ds.ReadCap(0));
        }