public void GetDelegateForIdpLocation_entity_descriptor_metadata_Test() { //ARRANGE var expected = new Uri("http://localhost:60879"); var metadata = EntityDescriptorProviderMock.GetEntityDescriptor(); var handler = new MetadataEntitityDescriptorHandler(); //ACT var del = IdpMetadataHandlerFactory.GetDelegateForIdpLocation(typeof(EntityDescriptor)); var uri = del(handler, metadata, new Uri(ProtocolBindings.HttpRedirect)); //ASSERT Assert.AreEqual(expected, uri); }
public void GetDelegateForIdpDescriptors_entity_descriptor_metadata_Test() { //ARRANGE var metadata = EntityDescriptorProviderMock.GetEntityDescriptor(); var handler = new MetadataEntitityDescriptorHandler(); //ACT var del = IdpMetadataHandlerFactory.GetDelegateForIdpDescriptors(typeof(EntityDescriptor), typeof(IdentityProviderSingleSignOnDescriptor)); var idps = del(handler, metadata) .ToList(); //ASSERT Assert.AreEqual(1, idps.Count); }