相关代码 |
|
import junit.framework.TestCase; public class TestCsvParser extends TestCase { // extends TestCase public void testParseSimpleLine() { // method name starts with 'test' CsvParser parser = new CsvParser(); parser.parse("Bill,Gates,555-1234"); // verify actual results equal those that are expected assertEquals("Bill", parser.get(0)); assertEquals("Gates", parser.get(1)); assertEquals("555-1234", parser.get(2)); } }
相关资源 |
|