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
jtulach@355
     1
package org.apidesign.livedb.example;
jtulach@355
     2
jtulach@357
     3
import java.sql.SQLException;
jtulach@357
     4
import java.util.List;
jtulach@355
     5
import junit.framework.TestCase;
jtulach@355
     6
jtulach@355
     7
/**
jtulach@355
     8
 *
jtulach@355
     9
 * @author Jaroslav Tulach <jtulach@netbeans.org>
jtulach@355
    10
 */
jtulach@355
    11
public class LiveDBTest extends TestCase {
jtulach@355
    12
    
jtulach@355
    13
    public LiveDBTest(String testName) {
jtulach@355
    14
        super(testName);
jtulach@355
    15
    }
jtulach@355
    16
jtulach@361
    17
    // BEGIN: livedb.test
jtulach@357
    18
    public void testSomeMethod() throws SQLException {
jtulach@357
    19
        List<Age> ages = Age.query();
jtulach@359
    20
        assertEquals("One record", 1, ages.size());
jtulach@359
    21
        Age age = ages.get(0);
jtulach@359
    22
        assertEquals("name is apidesign", "apidesign", age.NAME);
jtulach@359
    23
        assertEquals("it is three years old", 3, age.AGE.intValue());
jtulach@355
    24
    }
jtulach@361
    25
    // END: livedb.test
jtulach@355
    26
jtulach@355
    27
}