예제 #1
0
        public void Constructors()
        {
            var a = new Integer32();

            Assert.Equal(SnmpConstants.SmiInteger, a.Type);
            Assert.Equal(0, a.Value);

            var b = new Integer32(10);

            Assert.Equal(10, b.Value);

            var c = new Integer32(10);

            Assert.Equal(10, c.Value);
            b.Value = 12;
            Assert.Equal(10, c.Value);

            var d = new Integer32("15");

            Assert.Equal(15, d.Value);

            var e = (Integer32)d.Clone();

            d.Value = 20;
            Assert.Equal(15, e.Value);
        }