Beispiel #1
0
        public void IdentityProviderDictionary_Add_Nullcheck()
        {
            var subject = new IdentityProviderDictionary();

            Action a = () => subject.Add(null);

            a.ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("idp");
        }
Beispiel #2
0
        public void IdentityProviderDictionary_Indexer_Nullcheck()
        {
            var subject = new IdentityProviderDictionary();

            Action a = () => { var i = subject[null]; };

            a.ShouldThrow <ArgumentNullException>().And.ParamName.Should().Be("entityId");
        }
Beispiel #3
0
        public void IdentityProviderDictionary_Add()
        {
            var subject = new IdentityProviderDictionary();

            var entityId = new EntityId("http://idp.example.com");
            var idp      = new IdentityProvider(entityId, StubFactory.CreateSPOptions());

            subject.Add(idp);

            subject[entityId].Should().BeSameAs(idp);
        }