public void ZeroElementUsingItem_Negative()
        {
            var source = GetArray();
            var col    = new ModbusDataCollection <TData>(source);

            Assert.Throws <ArgumentOutOfRangeException>(() => col[0] = source[3]);
            Assert.Throws <ArgumentOutOfRangeException>(() => col.Insert(0, source[3]));
            Assert.Throws <ArgumentOutOfRangeException>(() => col.RemoveAt(0));

            // Remove forst zero/false
            Assert.Throws <ArgumentOutOfRangeException>(() => col.Remove(default(TData)));
        }
예제 #2
0
        public void InsertZeroElement()
        {
            ModbusDataCollection <bool> col = new ModbusDataCollection <bool>(true, false);

            col.Insert(0, true);
        }
 public void InsertZeroElement()
 {
     ModbusDataCollection<bool> col = new ModbusDataCollection<bool>(true, false);
     col.Insert(0, true);
 }
        public void InsertZeroElement()
        {
            ModbusDataCollection <bool> col = new ModbusDataCollection <bool>(true, false);

            Assert.Throws <ArgumentOutOfRangeException>(() => col.Insert(0, true));
        }
 public void InsertZeroElement()
 {
     ModbusDataCollection<bool> col = new ModbusDataCollection<bool>(true, false);
     Assert.Throws<ArgumentOutOfRangeException>(() => col.Insert(0, true));
 }