Esempio n. 1
0
        public void convertAPIToAPI()
        {
            apiVisibilityConfiguration1 = CreateTypicalAPIDocumentVisibilityConfiguration();
            apiVisibilityConfiguration2 = new DocumentVisibilityConfigurationConverter(apiVisibilityConfiguration1).ToAPIVisibilityConfiguration();

            Assert.IsNotNull(apiVisibilityConfiguration2);
            Assert.AreEqual(apiVisibilityConfiguration1, apiVisibilityConfiguration2);
        }
Esempio n. 2
0
 private Silanis.ESL.API.DocumentVisibilityConfiguration CreateTypicalAPIDocumentVisibilityConfiguration()
 {
     Silanis.ESL.API.DocumentVisibilityConfiguration configuration = new Silanis.ESL.API.DocumentVisibilityConfiguration();
     configuration.DocumentUid = "docId";
     configuration.RoleUids    = new List <string> {
         "role1Id", "role2Id"
     };
     return(configuration);
 }
Esempio n. 3
0
        public void convertSDKToAPI()
        {
            sdkVisibilityConfiguration1 = CreateTypicalSDKDocumentVisibilityConfiguration();
            apiVisibilityConfiguration1 = new DocumentVisibilityConfigurationConverter(sdkVisibilityConfiguration1).ToAPIVisibilityConfiguration();

            Assert.IsNotNull(apiVisibilityConfiguration1);
            Assert.AreEqual(sdkVisibilityConfiguration1.DocumentUid, apiVisibilityConfiguration1.DocumentUid);
            Assert.AreEqual(2, apiVisibilityConfiguration1.RoleUids.Count);
            CollectionAssert.AreEqual(sdkVisibilityConfiguration1.SignerIds, apiVisibilityConfiguration1.RoleUids);
        }
Esempio n. 4
0
        public void convertAPIToSDK()
        {
            apiVisibilityConfiguration1 = CreateTypicalAPIDocumentVisibilityConfiguration();
            sdkVisibilityConfiguration1 = new DocumentVisibilityConfigurationConverter(apiVisibilityConfiguration1).ToSDKVisibilityConfiguration();

            Assert.IsNotNull(sdkVisibilityConfiguration1);
            Assert.AreEqual(apiVisibilityConfiguration1.DocumentUid, sdkVisibilityConfiguration1.DocumentUid);
            Assert.AreEqual(2, sdkVisibilityConfiguration1.SignerIds.Count);
            CollectionAssert.AreEqual(apiVisibilityConfiguration1.RoleUids, sdkVisibilityConfiguration1.SignerIds);
        }
Esempio n. 5
0
        private Silanis.ESL.API.DocumentVisibility CreateTypicalAPIDocumentVisibility()
        {
            Silanis.ESL.API.DocumentVisibility visibility = new Silanis.ESL.API.DocumentVisibility();
            Silanis.ESL.API.DocumentVisibilityConfiguration configuration1 = new Silanis.ESL.API.DocumentVisibilityConfiguration();
            configuration1.DocumentUid = "doc1Id";
            configuration1.RoleUids    = new List <string> {
                "role1Id", "role2Id"
            };

            Silanis.ESL.API.DocumentVisibilityConfiguration configuration2 = new Silanis.ESL.API.DocumentVisibilityConfiguration();
            configuration2.DocumentUid = "doc2Id";
            configuration2.RoleUids    = new List <string> {
                "role2Id", "role3Id"
            };

            visibility.AddConfiguration(configuration1);
            visibility.AddConfiguration(configuration2);

            return(visibility);
        }
Esempio n. 6
0
 public void convertNullAPIToAPI()
 {
     apiVisibilityConfiguration1 = null;
     converter = new DocumentVisibilityConfigurationConverter(apiVisibilityConfiguration1);
     Assert.IsNull(converter.ToAPIVisibilityConfiguration());
 }