samples/livedb/test/org/apidesign/livedb/example/LiveDBTest.java
author Jaroslav Tulach <jtulach@netbeans.org>
Thu, 29 Jul 2010 17:44:59 +0200
changeset 361 6507a9474b6d
parent 359 9d430d9bc4b1
child 362 de139a9cfb36
permissions -rw-r--r--
Exposing code snippets, removing useless headers
     1 package org.apidesign.livedb.example;
     2 
     3 import java.sql.SQLException;
     4 import java.util.List;
     5 import junit.framework.TestCase;
     6 
     7 /**
     8  *
     9  * @author Jaroslav Tulach <jtulach@netbeans.org>
    10  */
    11 public class LiveDBTest extends TestCase {
    12     
    13     public LiveDBTest(String testName) {
    14         super(testName);
    15     }
    16 
    17     // BEGIN: livedb.test
    18     public void testSomeMethod() throws SQLException {
    19         List<Age> ages = Age.query();
    20         assertEquals("One record", 1, ages.size());
    21         Age age = ages.get(0);
    22         assertEquals("name is apidesign", "apidesign", age.NAME);
    23         assertEquals("it is three years old", 3, age.AGE.intValue());
    24     }
    25     // END: livedb.test
    26 
    27 }