public void trackAndUntrackColumns() { Assume.That(tracker.TrackedColumns.Count == 0); tracker.TrackColumns(columns); Assert.AreEqual(columns, tracker.TrackedColumns); tracker.UntrackColumn(3); tracker.UntrackColumn(0); tracker.UntrackColumn(1); Assert.IsTrue(tracker.TrackedColumns.Count == 0); tracker.TrackColumn(0); tracker.TrackColumns(columns); tracker.UntrackColumn(4); Assert.AreEqual(columns, tracker.TrackedColumns); tracker.UntrackColumns(columns); Assert.IsTrue(tracker.TrackedColumns.Count == 0); }
/** * Track several columns in the sheet for auto-sizing. * Note this has undefined behavior if columns are tracked after one or more rows are written to the sheet. * Any column in <code>columns</code> that are already tracked are ignored by this call. * * @param columns the columns to track for autosizing * @since 3.14beta1 */ public void TrackColumnsForAutoSizing(ICollection <int> columns) { _autoSizeColumnTracker.TrackColumns(columns); }