public void TestArgumentExceptions () { var uids = new UniqueIdRange (UniqueId.MinValue, UniqueId.MinValue); UniqueId uid; Assert.Throws<ArgumentNullException> (() => uids.CopyTo (null, 0)); Assert.Throws<ArgumentOutOfRangeException> (() => uids.CopyTo (new UniqueId[1], -1)); Assert.Throws<ArgumentOutOfRangeException> (() => uid = uids[-1]); Assert.Throws<ArgumentNullException> (() => UniqueIdRange.TryParse (null, 0, out uids)); }
public void TestArgumentExceptions() { var uids = new UniqueIdRange(UniqueId.MinValue, UniqueId.MinValue); UniqueId uid; Assert.Throws <ArgumentNullException> (() => uids.CopyTo(null, 0)); Assert.Throws <ArgumentOutOfRangeException> (() => uids.CopyTo(new UniqueId[1], -1)); Assert.Throws <ArgumentOutOfRangeException> (() => uid = uids[-1]); Assert.Throws <ArgumentNullException> (() => UniqueIdRange.TryParse(null, 0, out uids)); }