public void TestNotSupported() { var range = new UniqueIdRange(UniqueId.MinValue, UniqueId.MaxValue); Assert.Throws <NotSupportedException> (() => range[5] = new UniqueId(5), "set"); Assert.Throws <NotSupportedException> (() => range.Insert(0, new UniqueId(5)), "Insert"); Assert.Throws <NotSupportedException> (() => range.Remove(new UniqueId(5)), "Remove"); Assert.Throws <NotSupportedException> (() => range.RemoveAt(1), "RemoveAt"); Assert.Throws <NotSupportedException> (() => range.Add(new UniqueId(5)), "Add"); Assert.Throws <NotSupportedException> (() => range.Clear(), "Clear"); }
public void TestNotSupported () { var range = new UniqueIdRange (UniqueId.MinValue, UniqueId.MaxValue); Assert.Throws<NotSupportedException> (() => range[5] = new UniqueId (5), "set"); Assert.Throws<NotSupportedException> (() => range.Insert (0, new UniqueId (5)), "Insert"); Assert.Throws<NotSupportedException> (() => range.Remove (new UniqueId (5)), "Remove"); Assert.Throws<NotSupportedException> (() => range.RemoveAt (1), "RemoveAt"); Assert.Throws<NotSupportedException> (() => range.Add (new UniqueId (5)), "Add"); Assert.Throws<NotSupportedException> (() => range.Clear (), "Clear"); }