public void ThenTheAttributeIsFound() { string uid = _sut.Get(ShibbolethAttributes.UID_KEY); Assert.AreEqual("u0000001", uid); uid = _sut.GetUid(); Assert.AreEqual("u0000001", uid); var result = _sut.GetAll(); Assert.AreEqual(1, result.Count); Assert.AreEqual("u0000001", result[ShibbolethAttributes.UID_KEY]); }
public void Get() { var sb = new StringBuilder(); sb.AppendLine("HttpContext.Current.Request.ServerVariables :"); sb.AppendLine(); var serverVars = HttpContext.Current.Request.ServerVariables; foreach (string key in serverVars.AllKeys) { sb.AppendLine($"key: {key}, value: {serverVars[key]}"); } sb.AppendLine(); sb.AppendLine("HttpContext.Current.Request.Headers :"); sb.AppendLine(); var headers = HttpContext.Current.Request.Headers; foreach (string key in headers.AllKeys) { sb.AppendLine($"key: {key}, value: {headers[key]}"); } sb.AppendLine(); sb.AppendLine("Request.Headers :"); sb.AppendLine(); foreach (var kvp in Request.Headers) { sb.AppendLine($"key: {kvp.Key}, value: {string.Join(",", kvp.Value)}"); } sb.AppendLine(); sb.AppendLine("ShibbolethAttributes :"); foreach (var kvp in _shibbolethAttributes.GetAll()) { sb.AppendLine($"key: {kvp.Key}, value: {kvp.Value}"); } sb.AppendLine(); _log.Info(sb.ToString()); }