Skip to content

Instantly share code, notes, and snippets.

@abutcher
Created February 9, 2011 18:22
Show Gist options
  • Select an option

  • Save abutcher/818947 to your computer and use it in GitHub Desktop.

Select an option

Save abutcher/818947 to your computer and use it in GitHub Desktop.
package home;
import static org.junit.Assert.*;
import java.io.IOException;
import java.util.ArrayList;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class TableSizeTest {
private Table table;
@Before
public void setUp() throws Exception {
table = new Table("Test1");
table.addField("One", "integer");
table.addField("Two", "varchar");
table.addField("Three", "integer");
ArrayList list = new ArrayList();
list.add(1);
list.add("eee");
list.add(3);
table.writeRow(list);
table.readRow(1);
}
@After
public void tearDown() throws Exception {
table.dropTable();
}
@Test
public void testGetTableSize() throws IOException {
assertEquals("Size Test", table.getTableSize(), 13 );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment