public void IndexOf_Contains()
        {
            EncryptionPropertyCollection encPropertyCollection = new EncryptionPropertyCollection();
            EncryptionProperty           encProperty1          = new EncryptionProperty();
            EncryptionProperty           encProperty2          = new EncryptionProperty();

            encPropertyCollection.Add(encProperty1);
            encPropertyCollection.Add(encProperty2);
            Assert.Equal(0, encPropertyCollection.IndexOf(encProperty1));
            Assert.Equal(1, encPropertyCollection.IndexOf(encProperty2));
        }
        public void IndexOf_DoesNotContain()
        {
            EncryptionPropertyCollection encPropertyCollection = new EncryptionPropertyCollection();
            EncryptionProperty           encProperty           = new EncryptionProperty();

            Assert.Equal(-1, encPropertyCollection.IndexOf(encProperty));
        }
        public void Insert_EmptyCollection()
        {
            EncryptionPropertyCollection encPropertyCollection = new EncryptionPropertyCollection();
            EncryptionProperty           encProperty           = new EncryptionProperty();

            encPropertyCollection.Insert(0, encProperty);
            Assert.Equal(0, encPropertyCollection.IndexOf(encProperty));
        }
        public void InsertAt(int idx)
        {
            EncryptionPropertyCollection encPropertyCollection = new EncryptionPropertyCollection();

            for (int i = 0; i < 2; i++)
            {
                encPropertyCollection.Add(new EncryptionProperty());
            }
            EncryptionProperty encProperty3 = new EncryptionProperty();

            encPropertyCollection.Insert(idx, encProperty3);
            Assert.Equal(idx, encPropertyCollection.IndexOf(encProperty3));
        }
        public void RemoveAt(int collectionSize, int removeIdx)
        {
            EncryptionPropertyCollection encPropertyCollection = new EncryptionPropertyCollection();
            EncryptionProperty           toRemove = null;

            for (int i = 0; i < collectionSize; i++)
            {
                EncryptionProperty property = new EncryptionProperty();
                encPropertyCollection.Add(property);

                if (i == removeIdx)
                {
                    toRemove = property;
                }
            }

            encPropertyCollection.RemoveAt(removeIdx);
            Assert.Equal(-1, encPropertyCollection.IndexOf(toRemove));
            Assert.Equal(collectionSize - 1, encPropertyCollection.Count);
        }