forked from ringcentral/RingCentral.Net
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PhoneParseTest.cs
31 lines (29 loc) · 1.02 KB
/
PhoneParseTest.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
29
30
31
using System;
using Xunit;
namespace RingCentral.Tests
{
public class PhoneParseTest
{
[Fact]
public async void ParseNumber()
{
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 r = await rc.Restapi().NumberParser().Parse().Post(new ParsePhoneNumberRequest
{
originalStrings = new[] {"+1650-666-8888", "+1650-666-9999"}
});
Assert.NotNull(r);
}
}
}
}