コード例 #1
0
        public void AddIncreasesSize()
        {
            var storage = new MdnnDoubleSample(Variables);

            storage.Add(0);

            Assert.AreEqual(Variables + 1, storage.Variables);
        }
コード例 #2
0
        public void AddToIndex0ShiftsContents()
        {
            var storage = new MdnnDoubleSample(Values);

            storage.Add(0, NewValue);

            Assert.AreEqual(NewValue, storage[0]);
            Assert.AreEqual(Values[0], storage[1]);
        }
コード例 #3
0
        public void AddToMiddleShiftsFollowingContents()
        {
            const int insertIndex = 3;
            var       storage     = new MdnnDoubleSample(Values);

            storage.Add(insertIndex, NewValue);

            Assert.AreEqual(NewValue, storage[insertIndex]);
            Assert.AreEqual(Values[insertIndex], storage[insertIndex + 1]);
        }