Exemplo n.º 1
0
        public void Constructor()
        {
            //---------------Set up test pack-------------------
            //---------------Assert Precondition----------------
            //---------------Execute Test ----------------------
            var tableAttribute = new ThuriaRelationshipAttribute("TestRelationship", TharkRelationshipType.OneToOne, "KeyFieldName", "ForeignKeyFieldName");

            //---------------Test Result -----------------------
            tableAttribute.Should().NotBeNull();
        }
Exemplo n.º 2
0
        public void Constructor()
        {
            //---------------Set up test pack-------------------
            var dataModel             = new ThuriaTestDataModel();
            var relationshipAttribute = new ThuriaRelationshipAttribute("ForeignTest", TharkRelationshipType.OneToOne, "Id", "ThuriaTestId");
            //---------------Assert Precondition----------------
            //---------------Execute Test ----------------------
            var relationshipMetadata = new ThuriaDataModelRelationshipMetadata("Id", dataModel, relationshipAttribute);

            //---------------Test Result -----------------------
            relationshipMetadata.Should().NotBeNull();
        }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="parentPropertyName">Parent Property Name</param>
 /// <param name="dataModel">Data Model</param>
 /// <param name="relationship">Relationship Attribute</param>
 public ThuriaDataModelRelationshipMetadata(string parentPropertyName, object dataModel, ThuriaRelationshipAttribute relationship)
 {
     ParentPropertyName = parentPropertyName ?? throw new ArgumentNullException(nameof(parentPropertyName));
     DataModel          = dataModel ?? throw new ArgumentNullException(nameof(dataModel));
     Relationship       = relationship ?? throw new ArgumentNullException(nameof(relationship));
 }