public void ReadKeyDescriptorForSigningKeyUse(WsFederationMetadataTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadKeyDescriptorForSigningKeyUse", theoryData); var serializer = new WsFederationMetadataSerializerPublic(); try { serializer.ReadKeyDescriptorForSigningPublic(XmlReader.Create(new StringReader(theoryData.Metadata))); theoryData.ExpectedException.ProcessNoException(context); } catch (Exception ex) { theoryData.ExpectedException.ProcessException(ex, context); } TestUtilities.AssertFailIfErrors(context); }
public void ReadSecurityTokenEndpoint(WsFederationMetadataTheoryData theoryData) { var context = TestUtilities.WriteHeader($"{this}.ReadSecurityTokenEndpoint", theoryData); var serializer = new WsFederationMetadataSerializerPublic(); try { XmlReader reader = null; if (theoryData.Metadata != null) { reader = XmlReader.Create(new StringReader(theoryData.Metadata)); } serializer.ReadSecurityTokenEndpointPublic(reader); theoryData.ExpectedException.ProcessNoException(context); } catch (Exception ex) { theoryData.ExpectedException.ProcessException(ex, context); } TestUtilities.AssertFailIfErrors(context); }