public void Translate_SingleRow_ReturnHierarchicalObject()
        {
            // Arrange
            DateTime acceptanceDateSet = DateTime.Now;
            int      versionExpected   = 2324234;
            string   acceptanceTextSet = "Agreement text.";
            string   nameSet           = "TestName";
            string   surnameSet        = "TestSurname";

            Dictionary <string, object> row = new Dictionary <string, object>();

            row.Add(TestModelBuilder.TestEntityName_NamePropertyName, nameSet);
            row.Add(TestModelBuilder.TestEntityName_SurnamePropertyName, surnameSet);
            row.Add($"{TestModelBuilder.TestEntityName_AgreementsTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName_AcceptanceDatePropertyName}", acceptanceDateSet);
            row.Add($"{TestModelBuilder.TestEntityName_AgreementsTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName_AcceptedAgreementInfoTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName_AcceptedAgreementInfoTypeName_VersionPropertyName}", versionExpected);
            row.Add($"{TestModelBuilder.TestEntityName_AgreementsTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName_AcceptedAgreementInfoTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName_AcceptedAgreementInfoTypeName_TextPropertyName}", acceptanceTextSet);

            var model  = TestModelBuilder.BuildModel();
            var entity = model.SchemaElements.FirstOrDefault(f => f.Name == TestModelBuilder.TestEntityName) as EdmEntityType;

            // Act
            var edmStructuredObject = _sut.Translate(row, entity);

            // Assert
            AssertObject(edmStructuredObject, nameSet, surnameSet, acceptanceDateSet, versionExpected, acceptanceTextSet);
        }
        public void Translate_EnumerableOfRows_ReturnHierarchicalObject()
        {
            // Arrange
            DateTime acceptanceDateSet = DateTime.Now;
            int      versionExpected   = 2324234;
            string   acceptanceTextSet = "Agreement text.";
            string   nameSet           = "TestName";
            string   surnameSet        = "TestSurname";

            Dictionary <string, object> row = new Dictionary <string, object>();

            row.Add(TestModelBuilder.TestEntityName_NamePropertyName, nameSet);
            row.Add(TestModelBuilder.TestEntityName_SurnamePropertyName, surnameSet);
            row.Add($"{TestModelBuilder.TestEntityName_AgreementsTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName_AcceptanceDatePropertyName}", acceptanceDateSet);
            row.Add($"{TestModelBuilder.TestEntityName_AgreementsTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName_AcceptedAgreementInfoTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName_AcceptedAgreementInfoTypeName_VersionPropertyName}", versionExpected);
            row.Add($"{TestModelBuilder.TestEntityName_AgreementsTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName_AcceptedAgreementInfoTypeName}.{TestModelBuilder.TestEntityName_AgreementsTypeName_MarketingagreementTypeName_AcceptedAgreementInfoTypeName_TextPropertyName}", acceptanceTextSet);

            var model  = TestModelBuilder.BuildModel();
            var entity = model.SchemaElements.FirstOrDefault(f => f.Name == TestModelBuilder.TestEntityName) as EdmEntityType;

            EdmCollectionType edmCollectionType = new EdmCollectionType(new EdmEntityTypeReference(entity, false));

            var list = new List <IDictionary <string, object> > {
                row
            };

            // Act
            var edmEntityObject = _sut.Translate(list, edmCollectionType);

            // Assert
            var edmStructuredObject = edmEntityObject[0] as EdmStructuredObject;

            AssertObject(edmStructuredObject, nameSet, surnameSet, acceptanceDateSet, versionExpected, acceptanceTextSet);
        }