author | Jaroslav Tulach <jtulach@netbeans.org> |
Fri, 16 Jul 2010 23:35:08 +0200 | |
branch | livedb |
changeset 359 | 9d430d9bc4b1 |
parent 357 | 837370f791ba |
child 361 | 6507a9474b6d |
permissions | -rw-r--r-- |
jtulach@355 | 1 |
/* |
jtulach@355 | 2 |
* To change this template, choose Tools | Templates |
jtulach@355 | 3 |
* and open the template in the editor. |
jtulach@355 | 4 |
*/ |
jtulach@355 | 5 |
|
jtulach@355 | 6 |
package org.apidesign.livedb.example; |
jtulach@355 | 7 |
|
jtulach@357 | 8 |
import java.sql.SQLException; |
jtulach@357 | 9 |
import java.util.List; |
jtulach@355 | 10 |
import junit.framework.TestCase; |
jtulach@355 | 11 |
|
jtulach@355 | 12 |
/** |
jtulach@355 | 13 |
* |
jtulach@355 | 14 |
* @author Jaroslav Tulach <jtulach@netbeans.org> |
jtulach@355 | 15 |
*/ |
jtulach@355 | 16 |
public class LiveDBTest extends TestCase { |
jtulach@355 | 17 |
|
jtulach@355 | 18 |
public LiveDBTest(String testName) { |
jtulach@355 | 19 |
super(testName); |
jtulach@355 | 20 |
} |
jtulach@355 | 21 |
|
jtulach@357 | 22 |
public void testSomeMethod() throws SQLException { |
jtulach@357 | 23 |
List<Age> ages = Age.query(); |
jtulach@359 | 24 |
assertEquals("One record", 1, ages.size()); |
jtulach@359 | 25 |
Age age = ages.get(0); |
jtulach@359 | 26 |
assertEquals("name is apidesign", "apidesign", age.NAME); |
jtulach@359 | 27 |
assertEquals("it is three years old", 3, age.AGE.intValue()); |
jtulach@355 | 28 |
} |
jtulach@355 | 29 |
|
jtulach@355 | 30 |
} |