Ejemplo n.º 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));
		}
Ejemplo n.º 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));
        }