public ListShares ( long objectId, |
||
objectId | long | the object Id |
paging | the pagination request | |
shareScope | when specified with a value of |
|
Résultat | PaginatedResult |
public virtual void TestListShares() { server.setResponseBody("../../../TestSDK/resources/listShares.json"); IList <Share> shares = shareResourcesImpl.ListShares(2906571706525572L); Assert.True(shares.Count == 2, "The number of shares returned is incorrect."); Assert.AreEqual("*****@*****.**", shares[0].Email, "Email attribute of the share is incorrect."); Assert.AreEqual("*****@*****.**", shares[1].Email, "Email attribute of the share is incorrect."); }
public virtual void TestListShares() { server.setResponseBody("../../../TestSDK/resources/listShares.json"); PaginatedResult<Share> result = shareResourcesImpl.ListShares(2906571706525572L, new PaginationParameters(false, 100, 1)); Assert.True(result.Data.Count == 2, "The number of shares returned is incorrect."); Assert.AreEqual("*****@*****.**", result.Data[0].Email, "Email attribute of the share is incorrect."); Assert.AreEqual(null, result.Data[1].Email, "Email attribute of the share is incorrect."); Assert.IsTrue(AccessLevel.OWNER == result.Data[0].AccessLevel); Assert.IsTrue(ShareType.USER == result.Data[0].Type); Assert.IsTrue(2331373580117892 == result.Data[1].GroupId); Assert.IsTrue(ShareType.GROUP == result.Data[1].Type); Assert.IsTrue("AQAISF82FOeE" == result.Data[1].Id); Assert.IsTrue(AccessLevel.ADMIN == result.Data[1].AccessLevel); }