def test_it_is_possible_to_add_many_lines_on_header(self):
     table = Table()
     table.add_cell_on_header('x')
     table.add_cell_on_header('y')
     table.start_header_line()
     table.add_cell_on_header('z')
     self.assertEquals('<table><thead><tr><th>x</th><th>y</th></tr><tr><th>z</th></tr></thead><tbody></tbody></table>', table.as_html())
 def test_it_is_possible_to_add_many_lines_on_body_and_lines_has_default_class_styles(self):
     table = Table()
     table.add_cell('x')
     table.add_cell('y')
     table.start_line()
     table.add_cell('z')
     self.assertEquals('<table><thead></thead><tbody><tr class="odd"><td>x</td><td>y</td></tr><tr class="even"><td>z</td></tr></tbody></table>', table.as_html())
 def test_it_is_possible_to_add_cells_on_body_without_start_a_new_line(self):
     table = Table()
     table.add_cell('x')
     self.assertEquals('<table><thead></thead><tbody><tr class="odd"><td>x</td></tr></tbody></table>', table.as_html())
 def test_it_is_possible_to_add_cells_on_a_body_line_that_was_started_and_the_line_will_have_default_class_style(self):
     table = Table()
     table.start_line()
     table.add_cell('x')
     self.assertEquals('<table><thead></thead><tbody><tr class="odd"><td>x</td></tr></tbody></table>', table.as_html())
 def test_it_is_possible_to_add_cells_on_header_without_starting_a_new_line(self):
     table = Table()
     table.add_cell_on_header('x')
     self.assertEquals('<table><thead><tr><th>x</th></tr></thead><tbody></tbody></table>', table.as_html())
 def test_it_is_possible_to_add_cells_on_header_in_a_line_that_was_created(self):
     table = Table()
     table.start_header_line()
     table.add_cell_on_header('x')
     self.assertEquals('<table><thead><tr><th>x</th></tr></thead><tbody></tbody></table>', table.as_html())
 def test_empty_table_has_empty_header_and_empty_body(self):
     table = Table()
     self.assertEquals('<table><thead></thead><tbody></tbody></table>', table.as_html())