Source code: com/eireneh/bible/book/jdbc/ZTestBibleBookJDBC.java
1
2 package com.eireneh.bible.book.jdbc;
3
4 import java.io.*;
5 import java.util.*;
6 import java.net.*;
7
8 import com.eireneh.util.*;
9 import com.eireneh.bible.passage.*;
10
11 /**
12 * Attepmted 100% code coverage testing.
13 *
14 * <table border='1' cellPadding='3' cellSpacing='0' width="100%">
15 * <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
16 * Distribution Licence:<br />
17 * Project B is free software; you can redistribute it
18 * and/or modify it under the terms of the GNU General Public License,
19 * version 2 as published by the Free Software Foundation.<br />
20 * This program is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23 * General Public License for more details.<br />
24 * The License is available on the internet
25 * <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
26 * <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
27 * MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
28 * The copyright to this program is held by it's authors.
29 * </font></td></tr></table>
30 * @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
31 * @see docs.Licence
32 * @author Joe Walker
33 */
34 public class ZTestBibleBookJDBC extends TestBase
35 {
36 /**
37 * A basic are we OK type test, for the Passage package.
38 */
39 public void test(PrintWriter out, boolean fatal)
40 {
41 logPackageStart(out, fatal, ZTestBibleBookJDBC.class);
42
43 testJDBCBible();
44
45 logPackageStop();
46 }
47
48 /**
49 * Test the JDBCBible classe
50 */
51 public static void testJDBCBible()
52 {
53 try
54 {
55 log("JDBCBible.verseOrdinal()");
56 for (int b=1; b<=Books.booksInBible(); b++)
57 {
58 int max_chapter = Books.chaptersInBook(b);
59 int max_verse = Books.versesInChapter(b, max_chapter);
60
61 //test(db.verseOrdinal(b, 1, 1), Books.verseOrdinal(b, 1, 1));
62 //test(db.verseOrdinal(b, max_chapter, max_verse), Books.verseOrdinal(b, max_chapter, max_verse));
63
64 // Like to do this, but MS can't cope. :-(
65 // for (int c=1; c<=Books.chaptersIn(b); c++)
66 // for (int v=1; v<=Books.versesIn(b, c); v++)
67 }
68 }
69 catch (Exception ex)
70 {
71 fail(ex);
72 }
73 }
74 }