System.Data.Tests.DataRelationTest.Creation3 C# (CSharp) Метод

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

private Creation3 ( ) : void
Результат void
        public void Creation3()
        {
            DataRelation Relation = new DataRelation("Rel", _mom.Columns[1], _child.Columns[0], false);
            _set.Relations.Add(Relation);
            DataRelation Test = null;

            Assert.Equal(1, _mom.ChildRelations.Count);
            Assert.Equal(0, _child.ChildRelations.Count);
            Assert.Equal(0, _mom.ParentRelations.Count);
            Assert.Equal(1, _child.ParentRelations.Count);

            Test = _child.ParentRelations[0];

            Assert.Equal("Rel", Test.ToString());
            Assert.Equal("Rel", Test.RelationName);
            Assert.Equal("Mom", Test.ParentTable.TableName);

            Assert.Null(Test.ParentKeyConstraint);
            Assert.Null(Test.ParentKeyConstraint);

            Assert.Equal(1, Test.ParentColumns.Length);
            Assert.False(Test.Nested);
            Assert.Equal(0, Test.ExtendedProperties.Count);
            Assert.Equal("Child", Test.ChildTable.TableName);

            Assert.Null(Test.ChildKeyConstraint);
            Assert.Equal(1, Test.ChildColumns.Length);
            Assert.Equal(0, _mom.Constraints.Count);
            Assert.Equal(0, _child.Constraints.Count);
        }