public void GetAccessToken_TokenNotProvided_ReturnsEmptyToken() { LearningLayersOidcProvider lloidc = new LearningLayersOidcProvider(); Dictionary <string, string> redirectParameters = new Dictionary <string, string>(); LogAssert.Expect(LogType.Error, new Regex(@"\w*Redirect parameters did not contain access token\w*")); string res = lloidc.GetAccessToken(redirectParameters); Assert.IsEmpty(res); }
public void GetAccessToken_TokenProvided_ExtractsToken() { LearningLayersOidcProvider lloidc = new LearningLayersOidcProvider(); Dictionary <string, string> redirectParameters = new Dictionary <string, string>(); redirectParameters.Add("token", "myAccessToken"); string res = lloidc.GetAccessToken(redirectParameters); Assert.AreEqual("myAccessToken", res); }