コード例 #1
0
        public async void get_team_member_role_return_null()
        {
            TeamMembersClient teamMembersClient = new TeamMembersClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST);
            Role role = await teamMembersClient.GetTeamMemberRole("*****@*****.**");

            Assert.Null(role);
        }
コード例 #2
0
        public async void can_get_team_member_role()
        {
            TeamMembersClient teamMembersClient = new TeamMembersClient(ACCESS_KEY, SECRET_KEY, TenantName.ONEBLINK_TEST);
            Role role = await teamMembersClient.GetTeamMemberRole(this.email);

            Assert.NotNull(role);
        }
コード例 #3
0
        public async void get_team_member_role_should_throw_oneblink_exception()
        {
            OneBlinkAPIException oneBlinkAPIException = await Assert.ThrowsAsync <OneBlinkAPIException>(() =>
            {
                TeamMembersClient teamMembersClient = new TeamMembersClient("123", "aaaaaaaaaaaaaaabbbbbbbbbbbbbbbcccccccccccccccc", TenantName.ONEBLINK_TEST);
                return(teamMembersClient.GetTeamMemberRole(this.email));
            });

            Assert.Equal(HttpStatusCode.Unauthorized, oneBlinkAPIException.StatusCode);
        }