public void convertSDKToSDK()
 {
     sdkVisibility1 = CreateTypicalSDKDocumentVisibility();
     sdkVisibility2 = new DocumentVisibilityConverter(sdkVisibility1).ToSDKDocumentVisibility();
     Assert.IsNotNull(sdkVisibility2);
     Assert.AreEqual(sdkVisibility1, sdkVisibility2);
 }
Exemplo n.º 2
0
        public DocumentVisibility Build()
        {
            DocumentVisibility visibility = new DocumentVisibility();

            visibility.AddConfigurations(configurations);
            return(visibility);
        }
        public DocumentVisibility Build()
        {
            DocumentVisibility visibility = new DocumentVisibility();

            visibility.AddConfigurations(ConvertToDocumentVisibilityConfigurations());
            return(visibility);
        }
        public void convertSDKToAPI()
        {
            sdkVisibility1 = CreateTypicalSDKDocumentVisibility();
            apiVisibility1 = new DocumentVisibilityConverter(sdkVisibility1).ToAPIDocumentVisibility();

            Assert.IsNotNull(apiVisibility1);
            Assert.AreEqual(2, apiVisibility1.Configurations.Count);
            CollectionAssert.AreEqual(sdkVisibility1.GetConfiguration("doc1Id").SignerIds, apiVisibility1.Configurations[0].RoleUids);
            CollectionAssert.AreEqual(sdkVisibility1.GetConfiguration("doc2Id").SignerIds, apiVisibility1.Configurations[1].RoleUids);
        }
Exemplo n.º 5
0
 public DocumentVisibilityConverter(DocumentVisibility sdkVisibility)
 {
     this.sdkVisibility = sdkVisibility;
 }
Exemplo n.º 6
0
 public void ConfigureDocumentVisibility(PackageId packageId, DocumentVisibility visibility)
 {
     packageService.ConfigureDocumentVisibility(packageId, visibility);
 }
 public void convertNullSDKToSDK()
 {
     sdkVisibility1 = null;
     converter      = new DocumentVisibilityConverter(sdkVisibility1);
     Assert.IsNull(converter.ToSDKDocumentVisibility());
 }