public void AttributeStatement_Invalid_EncryptedAttribute_DKSaml20()
        {
            Assertion saml20Assertion           = AssertionUtil.GetBasicAssertion();
            List <StatementAbstract> statements = new List <StatementAbstract>(saml20Assertion.Items);
            AttributeStatement       sas        = GetAttributeStatement(statements);
            List <object>            attributes = new List <object>(sas.Items);
            EncryptedElement         ee         = new EncryptedElement();

            ee.encryptedData      = new EncryptedData();
            ee.encryptedData.Type = Saml20Constants.XENC + "Element";
            attributes.Add(ee);
            sas.Items             = attributes.ToArray();
            saml20Assertion.Items = statements.ToArray();

            XmlDocument doc = AssertionUtil.ConvertAssertion(saml20Assertion);

            new Saml20Assertion(doc.DocumentElement, null, false);
        }
        public void AttributeStatement_Invalid_Statementtype()
        {
            Assertion saml20Assertion = AssertionUtil.GetBasicAssertion();
            AuthzDecisionStatement authzDecisionStatement = new AuthzDecisionStatement();

            authzDecisionStatement.Decision            = DecisionType.Permit;
            authzDecisionStatement.Resource            = "http://safewhere.net";
            authzDecisionStatement.Action              = new dk.nita.saml20.Schema.Core.Action[] { new dk.nita.saml20.Schema.Core.Action() };
            authzDecisionStatement.Action[0].Namespace = "http://actionns.com";
            authzDecisionStatement.Action[0].Value     = "value";

            List <StatementAbstract> statements = new List <StatementAbstract>(saml20Assertion.Items);

            statements.Add(authzDecisionStatement);

            saml20Assertion.Items = statements.ToArray();

            new Saml20Assertion(AssertionUtil.ConvertAssertion(saml20Assertion).DocumentElement, null, false);
        }