Exemple #1
0
        public void MapToSourceColumn_Trivial()
        {
            var dataColumns = new []
            {
                new DataColumn("one"),
                new DataColumn("two"),
                new DataColumn("three"),
            };

            for (var i = 0; i < 3; i++)
            {
                Assert.AreEqual(i, AccessibleListView.MapToSourceColumn(dataColumns, i));
            }
        }
Exemple #2
0
        public void MapToSourceColumn_LastIsInvisible()
        {
            var dataColumns = new[]
            {
                new DataColumn("one"),
                new DataColumn("two"),
                new DataColumn("hidden")
                {
                    ExtendedProperties = { { "Visible", false } }
                },
            };

            Assert.AreEqual(0, AccessibleListView.MapToSourceColumn(dataColumns, 0));
            Assert.AreEqual(1, AccessibleListView.MapToSourceColumn(dataColumns, 1));
        }
Exemple #3
0
        public void MapToSourceColumn_FirstColumnIsId()
        {
            var dataColumns = new[]
            {
                new DataColumn("id")
                {
                    ExtendedProperties = { { "Visible", false } }
                },
                new DataColumn("one"),
                new DataColumn("two"),
            };

            Assert.AreEqual(1, AccessibleListView.MapToSourceColumn(dataColumns, 0));
            Assert.AreEqual(2, AccessibleListView.MapToSourceColumn(dataColumns, 1));
        }