Пример #1
0
		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));
		}
Пример #2
0
        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));
        }