samples/livedb/test/org/apidesign/livedb/example/LiveDBTest.java
author Jaroslav Tulach <jtulach@netbeans.org>
Wed, 14 Jul 2010 20:56:33 +0200
branchlivedb
changeset 357 837370f791ba
parent 355 d1e7424dc988
child 359 9d430d9bc4b1
permissions -rw-r--r--
Rewritting the processor to really connect to a database and read metadata from a real select statement
     1 /*
     2  * To change this template, choose Tools | Templates
     3  * and open the template in the editor.
     4  */
     5 
     6 package org.apidesign.livedb.example;
     7 
     8 import java.sql.SQLException;
     9 import java.util.List;
    10 import junit.framework.TestCase;
    11 
    12 /**
    13  *
    14  * @author Jaroslav Tulach <jtulach@netbeans.org>
    15  */
    16 public class LiveDBTest extends TestCase {
    17     
    18     public LiveDBTest(String testName) {
    19         super(testName);
    20     }
    21 
    22     public void testSomeMethod() throws SQLException {
    23         List<Age> ages = Age.query();
    24         for (Age age : ages) {
    25             System.out.printf("%s is %s years old\n", age.NAME, age.AGE);
    26         }
    27     }
    28 
    29 }