Skip to content

Commit 1c22966

Browse files
add test case for retrieve a user
1 parent 718363d commit 1c22966

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

Test/Notion.UnitTests/UserClientTest.cs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,27 @@ namespace Notion.UnitTests
77
public class UserClientTest
88
{
99
private readonly string _authToken;
10+
private readonly IUsersClient _client;
1011

1112
public UserClientTest()
1213
{
1314
_authToken = "<Token>";
15+
_client = new UsersClient(new RestClient(_authToken));
1416
}
1517

1618
[Fact(Skip = "Internal testing purpose")]
1719
public async Task ListUsers()
1820
{
19-
var restClient = new RestClient(_authToken);
20-
var client = new UsersClient(restClient);
21-
var usersList = await client.ListAsync();
21+
var usersList = await _client.ListAsync();
22+
Assert.NotNull(usersList);
23+
}
2224

25+
[Fact(Skip = "Internal testing purpose")]
26+
public async Task RetrieveUser()
27+
{
28+
string userId = "5e37c1b4-630f-4e81-bd6b-296af31e345f";
29+
var user = await _client.RetrieveAsync(userId);
30+
Assert.NotNull(user);
2331
}
2432
}
2533
}

0 commit comments

Comments
 (0)