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

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

private Creation ( ) : void
Результат void
        public void Creation()
        {
            DataRelation Relation = new DataRelation("Rel", _mom.Columns[1], _child.Columns[0]);
            _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.Equal(1, Test.ParentKeyConstraint.Columns.Length);
            Assert.False(Test.ParentKeyConstraint.IsPrimaryKey);
            Assert.Equal(1, Test.ParentColumns.Length);
            Assert.False(Test.Nested);
            Assert.Equal(0, Test.ExtendedProperties.Count);
            Assert.Equal("Child", Test.ChildTable.TableName);
            Assert.Equal("Rel", Test.ChildKeyConstraint.ConstraintName);
            Assert.Equal(1, Test.ChildColumns.Length);
        }