示例#1
0
        public static IEnumerable <object[]> GetTestData()
        {
            yield return(new object[] { _restApiProvider.GetBroadcastEndpoint(_appName, _hubName), _commonEndpoint });

            yield return(new object[] { _restApiProvider.GetSendToUserEndpoint(_appName, _hubName, _userId), $"{_commonEndpoint}/users/{_userId}" });

            yield return(new object[] { _restApiProvider.GetSendToGroupEndpoint(_appName, _hubName, _groupName), $"{_commonEndpoint}/groups/{_groupName}" });

            yield return(new object[] { _restApiProvider.GetUserGroupManagementEndpoint(_appName, _hubName, _userId, _groupName), $"{_commonEndpoint}/groups/{_groupName}/users/{_userId}" });

            yield return(new object[] { _restApiProvider.GetSendToConnectionEndpoint(_appName, _hubName, _connectionId), $"{_commonEndpoint}/connections/{_connectionId}" });

            yield return(new object[] { _restApiProvider.GetConnectionGroupManagementEndpoint(_appName, _hubName, _connectionId, _groupName), $"{_commonEndpoint}/groups/{_groupName}/connections/{_connectionId}" });
        }
示例#2
0
        public static IEnumerable <object[]> GetTestData()
        {
            var broadcastApi       = _restApiProvider.GetBroadcastEndpoint();
            var sendToUserApi      = _restApiProvider.GetSendToUserEndpoint(_userId);
            var sendToGroupApi     = _restApiProvider.GetSendToGroupEndpoint(_groupName);
            var groupManagementApi = _restApiProvider.GetUserGroupManagementEndpoint(_userId, _groupName);

            yield return(new object[] { broadcastApi.Audience, broadcastApi.Token, _commonEndpoint });

            yield return(new object[] { sendToUserApi.Audience, sendToUserApi.Token, $"{_commonEndpoint}/users/{_userId}" });

            yield return(new object[] { sendToGroupApi.Audience, sendToGroupApi.Token, $"{_commonEndpoint}/groups/{_groupName}" });

            yield return(new object[] { groupManagementApi.Audience, groupManagementApi.Token, $"{_commonEndpoint}/groups/{_groupName}/users/{_userId}" });
        }