UniqueListTests MixingUniqueList 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 MixingUniqueList()
Examples

[Test]
public void MixingUniqueList()
{
    int[] list = { 4, 5, 6, 7, 8, 9 };
    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