System.Data.Tests.ConstraintCollectionTest.AddExceptions C# (CSharp) Метод

AddExceptions() приватный Метод

private AddExceptions ( ) : void
Результат void
        public void AddExceptions()
        {
            ConstraintCollection col = _table.Constraints;
            Assert.Throws<ArgumentNullException>(() => col.Add(null));

            _constraint1.ConstraintName = "Dog";
            col.Add(_constraint1);
            Assert.Throws<DataException>(() => col.Add(_constraint1));
        }