forked from ringcentral/RingCentral.Net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PermissionsTest.cs
28 lines (26 loc) · 963 Bytes
/
PermissionsTest.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
using System;
using Xunit;
namespace RingCentral.Tests
{
public class PermissionsTest
{
[Fact]
public async void GetPermissions()
{
using (var rc = new RestClient(
Environment.GetEnvironmentVariable("RINGCENTRAL_CLIENT_ID"),
Environment.GetEnvironmentVariable("RINGCENTRAL_CLIENT_SECRET"),
Environment.GetEnvironmentVariable("RINGCENTRAL_SERVER_URL")
))
{
await rc.Authorize(
Environment.GetEnvironmentVariable("RINGCENTRAL_USERNAME"),
Environment.GetEnvironmentVariable("RINGCENTRAL_EXTENSION"),
Environment.GetEnvironmentVariable("RINGCENTRAL_PASSWORD")
);
var str = await rc.Get<string>("/restapi/v1.0/dictionary/permission/HUD");
Assert.Contains("HUD", str);
}
}
}
}