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 RemoveAtZeroElement()
        {
            ModbusDataCollection <bool> col = new ModbusDataCollection <bool>(true, false);

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

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