public void EmptyString_KeyType()
        {

            vCardCertificate cert = new vCardCertificate();

            Assert.IsEmpty(
                cert.KeyType,
                "The string KeyType property should default to String.Empty.");

            cert.KeyType = null;

            Assert.IsEmpty(
                cert.KeyType,
                "The string KeyType should be String.Empty when assigned null.");

        }
Beispiel #2
0
        public static void Equals(vCardCertificate c1, vCardCertificate c2)
        {

            Assert.AreEqual(
                c1.KeyType,
                c2.KeyType,
                "The key type of the certificates differ.");

        }
        /// <summary>
        ///     Reads the KEY property.
        /// </summary>
        private void ReadInto_KEY(vCard card, vCardProperty property)
        {

            // The KEY property defines a security certificate
            // that has been attached to the vCard.  Key values
            // are usually encoded in BASE64 because they
            // often consist of binary data.

            vCardCertificate certificate = new vCardCertificate();
            certificate.Data = (byte[])property.Value;

            // TODO: Support other key types.

            if (property.Subproperties.Contains("X509"))
                certificate.KeyType = "X509";

            card.Certificates.Add(certificate);

        }