public void Consolidate(string[] inputItems, string[] expectedItems)
        {
            SimpleFrameListConsolidator<string> nConsolidator = new SimpleFrameListConsolidator<string>();
            IDictionary<string, int> dictionary = new Dictionary<string, int>();

            DataTable table = TableGenerator.CreateTable(inputItems);
            nConsolidator.Consolidate(table, 0, dictionary);

            Assert.AreEqual(expectedItems.Length, dictionary.Count, "Count should match expected.");
            for (int i = 0; i < expectedItems.Length; i++)
            {
                Assert.IsTrue(dictionary.ContainsKey(expectedItems[i]));
            }
        }
        public void Consolidate_WithMisMatchedColumns(int rowCount, Type[] colTypes)
        {
            SimpleFrameListConsolidator<int> nConsolidator = new SimpleFrameListConsolidator<int>();
            IDictionary<int, int> dictionary = new Dictionary<int, int>();

            DataTable table = TableGenerator.CreateTable(rowCount, colTypes);
            nConsolidator.Consolidate(table, 0, dictionary);
            nConsolidator.Consolidate(table, 1, dictionary);
        }
        public void Consolidate__ByNameForStringsAndIgnoringCase(string[] inputItems, string[] expectedItems)
        {
            SimpleFrameListConsolidator<string> nConsolidator = new SimpleFrameListConsolidator<string>();
            IDictionary<string, int> dictionary = new Dictionary<string, int>(StringComparer.Create(new CultureInfo("en"), true));

            DataTable table = TableGenerator.CreateTable(inputItems, "X");
            nConsolidator.Consolidate(table, "X", dictionary);

            Assert.AreEqual(expectedItems.Length, dictionary.Count, "Count should match expected.");
            for (int i = 0; i < expectedItems.Length; i++)
            {
                Assert.IsTrue(dictionary.ContainsKey(expectedItems[i]));
            }
        }
        public void Consolidate_CheckRowIndices(int[] inputItems, int[] expectedItems)
        {
            SimpleFrameListConsolidator<int> nConsolidator = new SimpleFrameListConsolidator<int>();
            IDictionary<int, int> dictionary = new Dictionary<int, int>();

            IList<int> rowIndices = null;
            DataTable table = TableGenerator.CreateTable(inputItems);
            nConsolidator.Consolidate(table, 0, dictionary, out rowIndices);

            Assert.IsNotNull(rowIndices, "TestCase indices should not be null.");
            Assert.AreEqual(expectedItems.Length, dictionary.Count, "Count should match expected.");
            Assert.AreEqual(expectedItems.Length, rowIndices.Count, "Count should match expected.");
        }