internal List <Silanis.ESL.API.ReferencedDocument> CreateApiReferencedDocumentsForTest()
        {
            List <Silanis.ESL.API.ReferencedDocument> documents = new List <Silanis.ESL.API.ReferencedDocument>();

            Silanis.ESL.API.ReferencedDocument referencedDocument = new Silanis.ESL.API.ReferencedDocument();
            referencedDocument.DocumentId = DOCUMENT_ID;
            referencedDocument.Fields     = createApiReferencedFieldsForTest();

            documents.Add(referencedDocument);
            return(documents);
        }
Example #2
0
        public override void ConvertAPIToSDK()
        {
            List <Silanis.ESL.API.ReferencedField> apiFields = createApiReferencedFieldsForTest();

            Silanis.ESL.API.ReferencedDocument api = new Silanis.ESL.API.ReferencedDocument();
            api.DocumentId = DOCUMENT_ID;
            api.Fields     = apiFields;

            ReferencedDocument sdk = ReferencedDocumentConverter.ToSDK(api);

            Assert.AreEqual(sdk.DocumentId, DOCUMENT_ID);
            Assert.IsTrue(compareReferencedFields(apiFields, sdk.Fields));
        }
Example #3
0
        public override void ConvertSDKToAPI()
        {
            List <ReferencedField> sdkFields = createSdkReferencedFieldsForTest();

            ReferencedDocument sdk = new ReferencedDocument();

            sdk.DocumentId = DOCUMENT_ID;
            sdk.Fields     = sdkFields;

            Silanis.ESL.API.ReferencedDocument api = ReferencedDocumentConverter.ToAPI(sdk);

            Assert.AreEqual(api.DocumentId, DOCUMENT_ID);
            Assert.IsTrue(compareReferencedFields(api.Fields, sdkFields));
        }
 internal Boolean compareReferencedDocuments(Silanis.ESL.API.ReferencedDocument apiRefDoc, ReferencedDocument sdkRefDoc)
 {
     return(apiRefDoc.DocumentId.Equals(sdkRefDoc.DocumentId) &&
            compareReferencedFields(apiRefDoc.Fields, sdkRefDoc.Fields));
 }
Example #5
0
 public override void ConvertNullSDKToAPI()
 {
     Silanis.ESL.API.ReferencedDocument api = ReferencedDocumentConverter.ToAPI(null);
     Assert.IsNull(api);
 }