Created
February 9, 2011 18:22
-
-
Save abutcher/818947 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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