예제 #1
0
 private RowRecordsAggregate(SharedValueManager svm)
 {
     _rowRecords = new SortedList();
     _valuesAgg = new ValueRecordsAggregate();
     _unknownRecords = new ArrayList();
     _sharedValueManager = svm;
 }
예제 #2
0
 private RowRecordsAggregate(SharedValueManager svm)
 {
     _rowRecords         = new SortedList();
     _valuesAgg          = new ValueRecordsAggregate();
     _unknownRecords     = new List <Record>();
     _sharedValueManager = svm;
 }
예제 #3
0
 public void TearDown()
 {
     valueRecord = new ValueRecordsAggregate();
 }
예제 #4
0
        public void TestRemoveNewRow_bug46312()
        {
            // To make bug occur, rowIndex needs to be >= ValueRecordsAggregate.records.length
            int rowIndex = 30;

            ValueRecordsAggregate vra = new ValueRecordsAggregate();
            try
            {
                vra.RemoveAllCellsValuesForRow(rowIndex);
            }
            catch (ArgumentException e)
            {
                if (e.Message.Equals("Specified rowIndex 30 is outside the allowable range (0..30)"))
                {
                    throw new AssertionException("Identified bug 46312");
                }
                throw e;
            }

            //if (false) { // same bug as demonstrated through usermodel API

            //    HSSFWorkbook wb = new HSSFWorkbook();
            //    HSSFSheet sheet = (HSSFSheet)wb.CreateSheet();
            //    HSSFRow row = (HSSFRow)sheet.CreateRow(rowIndex);
            //    if (false) { // must not add any cells to the new row if we want to see the bug
            //        row.CreateCell(0); // this causes ValueRecordsAggregate.records to auto-extend
            //    }
            //    try {
            //        sheet.CreateRow(rowIndex);
            //    } catch (ArgumentException e) {
            //        throw new AssertionException("Identified bug 46312");
            //    }
            //}
        }