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)); } }
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)); }
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)); }