public static void RemoveTest()
        {
            // trying to remove item in collection.
            string[] anArray = { "one", "two", "three", "four" };
            ObservableCollection <string>              col         = new ObservableCollection <string>(anArray);
            ReadOnlyObservableCollection <string>      readonlyCol = new ReadOnlyObservableCollection <string>(col);
            ReadOnlyCollectionAndPropertyChangedTester helper      = new ReadOnlyCollectionAndPropertyChangedTester();

            helper.RemoveItemTest(readonlyCol, col, 2, "three", true, hasDuplicates: false);

            // trying to remove item not in collection.
            anArray     = new string[] { "one", "two", "three", "four" };
            col         = new ObservableCollection <string>(anArray);
            readonlyCol = new ReadOnlyObservableCollection <string>(col);
            helper      = new ReadOnlyCollectionAndPropertyChangedTester();
            helper.RemoveItemTest(readonlyCol, col, -1, "three2", false, hasDuplicates: false);

            // removing null
            anArray     = new string[] { "one", "two", "three", "four" };
            col         = new ObservableCollection <string>(anArray);
            readonlyCol = new ReadOnlyObservableCollection <string>(col);
            helper      = new ReadOnlyCollectionAndPropertyChangedTester();
            helper.RemoveItemTest(readonlyCol, col, -1, null, false, hasDuplicates: false);

            // trying to remove item in collection that has duplicates.
            anArray     = new string[] { "one", "three", "two", "three", "four" };
            col         = new ObservableCollection <string>(anArray);
            readonlyCol = new ReadOnlyObservableCollection <string>(col);
            helper      = new ReadOnlyCollectionAndPropertyChangedTester();
            helper.RemoveItemTest(readonlyCol, col, 1, "three", true, hasDuplicates: true);
            // want to ensure that there is one "three" left in collection and not both were removed.
            int occurancesThree = 0;

            foreach (var item in col)
            {
                if (item.Equals("three"))
                {
                    occurancesThree++;
                }
            }
            Assert.Equal(1, occurancesThree);
        }
        public static void RemoveTest()
        {
            // trying to remove item in collection.
            string[] anArray = { "one", "two", "three", "four" };
            ObservableCollection<string> col = new ObservableCollection<string>(anArray);
            ReadOnlyObservableCollection<string> readonlyCol = new ReadOnlyObservableCollection<string>(col);
            ReadOnlyCollectionAndPropertyChangedTester helper = new ReadOnlyCollectionAndPropertyChangedTester();
            helper.RemoveItemTest(readonlyCol, col, 2, "three", true, hasDuplicates: false);

            // trying to remove item not in collection.
            anArray = new string[] { "one", "two", "three", "four" };
            col = new ObservableCollection<string>(anArray);
            readonlyCol = new ReadOnlyObservableCollection<string>(col);
            helper = new ReadOnlyCollectionAndPropertyChangedTester();
            helper.RemoveItemTest(readonlyCol, col, -1, "three2", false, hasDuplicates: false);

            // removing null
            anArray = new string[] { "one", "two", "three", "four" };
            col = new ObservableCollection<string>(anArray);
            readonlyCol = new ReadOnlyObservableCollection<string>(col);
            helper = new ReadOnlyCollectionAndPropertyChangedTester();
            helper.RemoveItemTest(readonlyCol, col, -1, null, false, hasDuplicates: false);

            // trying to remove item in collection that has duplicates.
            anArray = new string[] { "one", "three", "two", "three", "four" };
            col = new ObservableCollection<string>(anArray);
            readonlyCol = new ReadOnlyObservableCollection<string>(col);
            helper = new ReadOnlyCollectionAndPropertyChangedTester();
            helper.RemoveItemTest(readonlyCol, col, 1, "three", true, hasDuplicates: true);
            // want to ensure that there is one "three" left in collection and not both were removed.
            int occurancesThree = 0;
            foreach (var item in col)
            {
                if (item.Equals("three"))
                    occurancesThree++;
            }
            Assert.Equal(1, occurancesThree);
        }