예제 #1
0
        public void Clear_DoesNotResetElementTypeToNull()
        {
            var list = new BsfList();

            Assert.AreEqual(BsfType.Null, list.ElementType);

            list.Add(new BsfByte(0));
            Assert.AreEqual(BsfType.Byte, list.ElementType);

            list.Clear();
            Assert.AreNotEqual(BsfType.Null, list.ElementType);
        }
예제 #2
0
        public void Add_NullProvided_DoesNotChangeElementType()
        {
            var list = new BsfList();

            Assert.AreEqual(BsfType.Null, list.ElementType);

            list.Add(null);
            Assert.AreEqual(BsfType.Null, list.ElementType);

            list.Add(new BsfByte(0));
            Assert.AreEqual(BsfType.Byte, list.ElementType);

            list.Add(null);
            Assert.AreEqual(BsfType.Byte, list.ElementType);
        }