Test internal structure state after insert operations. It is important for insert workflow to be constant to avoid side effect with functions related to internal structure.
(t *testing.T)
| 401 | // for insert workflow to be constant to avoid side effect with functions |
| 402 | // related to internal structure. |
| 403 | func TestInsertRowsInEmptyFile(t *testing.T) { |
| 404 | f := NewFile() |
| 405 | sheet1 := f.GetSheetName(0) |
| 406 | r, err := f.workSheetReader(sheet1) |
| 407 | assert.NoError(t, err) |
| 408 | assert.NoError(t, f.InsertRows(sheet1, 1, 1)) |
| 409 | assert.Len(t, r.SheetData.Row, 0) |
| 410 | assert.NoError(t, f.InsertRows(sheet1, 2, 1)) |
| 411 | assert.Len(t, r.SheetData.Row, 0) |
| 412 | assert.NoError(t, f.InsertRows(sheet1, 99, 1)) |
| 413 | assert.Len(t, r.SheetData.Row, 0) |
| 414 | assert.NoError(t, f.SaveAs(filepath.Join("test", "TestInsertRowInEmptyFile.xlsx"))) |
| 415 | } |
| 416 | |
| 417 | func prepareTestBook2() (*File, error) { |
| 418 | f := NewFile() |
nothing calls this directly
no test coverage detected