public void AddIncreasesSize() { var storage = new MdnnDoubleSample(Variables); storage.Add(0); Assert.AreEqual(Variables + 1, storage.Variables); }
public void AddToIndex0ShiftsContents() { var storage = new MdnnDoubleSample(Values); storage.Add(0, NewValue); Assert.AreEqual(NewValue, storage[0]); Assert.AreEqual(Values[0], storage[1]); }
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]); }