public static Status ToStatus(this SamlResponseStatus status, SamlResponseStatus?subStatus = null) { var s = new Status { StatusCode = new StatusCode { Value = status.ToStatusUri() } }; if (subStatus != null) { s.StatusCode.SubCode = new StatusCode { Value = subStatus.Value.ToStatusUri() } } ; return(s); }
public void ShouldConvertToUri(SamlResponseStatus status, string expected) { var uri = status.ToStatusUri(); Assert.Equal(new Uri(expected), uri); }