UniqueListTests InsertRemoveFromUniqueList Method Delta Engine Documentation

Namespace: DeltaEngine.Tests.Extensions
Assembly: DeltaEngine.Tests (in DeltaEngine.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void InsertRemoveFromUniqueList()
Examples

[Test]
public void InsertRemoveFromUniqueList()
{
    int[] list = { 4, 5, 6 };
    var uniquelist = new UniqueList<int>();
    uniquelist.Insert(0, 3);
    uniquelist.Insert(0, 2);
    uniquelist.Insert(0, 1);
    uniquelist.AddRange(list);
    Assert.AreEqual(1, uniquelist[0]);
    Assert.AreEqual(2, uniquelist[1]);
    Assert.AreEqual(3, uniquelist[2]);
    uniquelist.RemoveAt(0);
    uniquelist.RemoveAt(0);
    uniquelist.RemoveAt(0);
    Assert.AreEqual(4, uniquelist[0]);
}
See Also