1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/samples/livedb/src/test/java/org/apidesign/livedb/example/LiveDBTest.java Tue Nov 12 08:55:35 2019 +0100
1.3 @@ -0,0 +1,28 @@
1.4 +package org.apidesign.livedb.example;
1.5 +
1.6 +import java.sql.SQLException;
1.7 +import java.util.List;
1.8 +import static junit.framework.TestCase.assertEquals;
1.9 +import org.junit.Test;
1.10 +
1.11 +/**
1.12 + *
1.13 + * @author Jaroslav Tulach <jtulach@netbeans.org>
1.14 + */
1.15 +public class LiveDBTest {
1.16 +
1.17 + public LiveDBTest() {
1.18 + }
1.19 +
1.20 + @Test
1.21 + public void testSomeMethod() throws SQLException {
1.22 + // BEGIN: livedb.test
1.23 + List<Age> ages = Age.query();
1.24 + assertEquals("One record", 1, ages.size());
1.25 + Age age = ages.get(0);
1.26 + assertEquals("name is apidesign", "apidesign", age.NAME);
1.27 + assertEquals("it is three years old", 3, age.AGE.intValue());
1.28 + // END: livedb.test
1.29 + }
1.30 +
1.31 +}