コード例 #1
0
        public void GivenIHaveSTSTokenWithClientClientSecretAndScope(string clientId, string clientSecret, string scope)
        {
            var Client_ID     = ConfigurationManager.AppSettings[clientId];
            var Client_Secret = ConfigurationManager.AppSettings[clientSecret];
            var Scope         = ConfigurationManager.AppSettings[scope];

            var accessToken = TokenApiService.StsAccessToken(Client_ID, Client_Secret, Scope);

            //Assert.IsNotNull(accessToken, $"Access token should not be null given client {clientId} and scope {scope}");
            AddToContext("accessToken", accessToken);
        }
コード例 #2
0
 public void GivenIHaveSTSAccessToken()
 {
     ScenarioContext.Current.Add("accessToken", TokenApiService.StsAccessToken());
 }