public void CopyTo_ArrayNull()
        {
            EncryptionPropertyCollection encPropertyCollection = new EncryptionPropertyCollection();
            EncryptionProperty           encProperty           = new EncryptionProperty();

            encPropertyCollection.Add(encProperty);
            Assert.Throws <ArgumentNullException>(() => encPropertyCollection.CopyTo(null, 0));
        }
        public void CopyTo()
        {
            EncryptionPropertyCollection encPropertyCollection = new EncryptionPropertyCollection();
            EncryptionProperty           encProperty           = new EncryptionProperty();

            encPropertyCollection.Add(encProperty);
            EncryptionProperty[] encPropertyArray = new EncryptionProperty[encPropertyCollection.Count];
            encPropertyCollection.CopyTo(encPropertyArray, 0);
            Assert.Equal(encProperty, encPropertyArray[0]);
        }
        public void CopyTo_IndexOutOfRange()
        {
            EncryptionPropertyCollection encPropertyCollection = new EncryptionPropertyCollection();

            for (int i = 0; i < 2; i++)
            {
                encPropertyCollection.Add(new EncryptionProperty());
            }
            EncryptionProperty[] encPropertyArray = new EncryptionProperty[2];
            Assert.Throws <ArgumentOutOfRangeException>(() => encPropertyCollection.CopyTo(encPropertyArray, -1));
        }
        public void CopyTo_ArrayTooSmall()
        {
            EncryptionPropertyCollection encPropertyCollection = new EncryptionPropertyCollection();

            for (int i = 0; i < 2; i++)
            {
                encPropertyCollection.Add(new EncryptionProperty());
            }
            EncryptionProperty[] encPropertyArray = new EncryptionProperty[1];
            Assert.Throws <ArgumentException>(() => encPropertyCollection.CopyTo(encPropertyArray, 0));
        }