row_test.go 351 B

1234567891011121314151617181920
  1. package xlsx
  2. import (
  3. . "gopkg.in/check.v1"
  4. )
  5. type RowSuite struct{}
  6. var _ = Suite(&RowSuite{})
  7. // Test we can add a new Cell to a Row
  8. func (r *RowSuite) TestAddCell(c *C) {
  9. var f *File
  10. f = NewFile()
  11. sheet, _ := f.AddSheet("MySheet")
  12. row := sheet.AddRow()
  13. cell := row.AddCell()
  14. c.Assert(cell, NotNil)
  15. c.Assert(len(row.Cells), Equals, 1)
  16. }