public void Saml2IdpEntry_NullCheckProviderId()
        {
            var subject = new Saml2IdpEntry(new EntityId("urn:foo"));

            subject.Invoking(s => s.ProviderId = null)
                .ShouldThrow<ArgumentNullException>();
        }
        public void Saml2IdpEntry_ToXElement_OnlyProviderId()
        {
            var subject = new Saml2IdpEntry(new EntityId("urn:foo"))
            {
                Location = null,
                Name = null
            };

            var actual = subject.ToXElement();

            var expected = new XElement(Saml2Namespaces.Saml2P + "IDPEntry",
                new XAttribute("ProviderID", "urn:foo"));

            actual.Should().BeEquivalentTo(expected);
        }
Example #3
0
 /// <summary>
 /// Fluent config helper that adds a <see cref="Saml2IdpEntry"/> to the
 /// <see cref="Saml2Scoping"/>
 /// </summary>
 /// <param name="idpEntry">Idp entry to add</param>
 /// <returns>this</returns>
 public Saml2Scoping With(Saml2IdpEntry idpEntry)
 {
     IdPEntries.Add(idpEntry);
     return(this);
 }
 /// <summary>
 /// Fluent config helper that adds a <see cref="Saml2IdpEntry"/> to the 
 /// <see cref="Saml2Scoping"/>
 /// </summary>
 /// <param name="idpEntry">Idp entry to add</param>
 /// <returns>this</returns>
 public Saml2Scoping With(Saml2IdpEntry idpEntry)
 {
     IdPEntries.Add(idpEntry);
     return this;
 }