Creating the database in Ant. Placing it on a test classpath. Test test now checks real DB content.
2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
6 package org.apidesign.livedb.example;
8 import java.sql.SQLException;
10 import junit.framework.TestCase;
14 * @author Jaroslav Tulach <jtulach@netbeans.org>
16 public class LiveDBTest extends TestCase {
18 public LiveDBTest(String testName) {
22 public void testSomeMethod() throws SQLException {
23 List<Age> ages = Age.query();
24 assertEquals("One record", 1, ages.size());
25 Age age = ages.get(0);
26 assertEquals("name is apidesign", "apidesign", age.NAME);
27 assertEquals("it is three years old", 3, age.AGE.intValue());