- Notifications
You must be signed in to change notification settings - Fork 196
/
Copy pathSdkMethodsTests.cs
51 lines (47 loc) · 1.41 KB
/
SdkMethodsTests.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
usingSystem;
usingSystem.Diagnostics;
usingSystem.Linq;
usingSystem.Net.Http;
usingSystem.Threading.Tasks;
usingLooker.RTL;
usingLooker.SDK.API40;
usingXunit;
usingXunit.Abstractions;
namespacesdkrtl.Tests
{
publicclassSdkMethodsTests
{
privatereadonlyITestOutputHelper_testOutputHelper;
privateTestConfig_config;
privateITransport_transport;
privateIAuthSession_auth;
privateLooker40SDKsdk;
publicSdkMethodsTests(ITestOutputHelpertestOutputHelper)
{
_testOutputHelper=testOutputHelper;
_config=newTestConfig();
_transport=newTransport(_config.Settings);
_auth=newAuthSession(_config.Settings,_transport);
sdk=newLooker40SDK(_auth);
}
[Fact]
publicasyncvoidAllDashboardsTest()
{
varactual=awaitsdk.Ok(sdk.all_dashboards());
Assert.NotNull(actual);
Assert.True(actual.Length>0);
vardashes=actual
.Where(d =>d.title!.Contains("SDK"))
.Select(x =>x)
.ToList();
Assert.True(dashes.Count>0);
}
[Fact]
publicasyncvoidMeTest()
{
varactual=awaitsdk.Ok(sdk.me());
Assert.NotNull(actual);
Assert.NotNull(actual.first_name);
}
}
}