| 5 | import java.sql.Connection; |
| 6 | |
| 7 | public class DummyDatabase extends Database { |
| 8 | |
| 9 | public DummyDatabase() throws NoConnectionException { |
| 10 | super(null); |
| 11 | } |
| 12 | |
| 13 | @Override |
| 14 | protected synchronized Connection openConnection() { |
| 15 | connected = true; |
| 16 | return null; |
| 17 | } |
| 18 | |
| 19 | @Override |
| 20 | public <T> SQLQuery<T> get(Class<T> entity) { |
| 21 | return new DummySQLQuery<T>(this, entity); |
| 22 | } |
| 23 | |
| 24 | @Override |
| 25 | public int doUpdate(String query, Object... fields) { |
| 26 | return 0; |
| 27 | } |
| 28 | |
| 29 | @Override |
| 30 | protected int doUpdateWithGeneratedKeys(String query, Object... fields) { |
| 31 | return 0; |
| 32 | } |
| 33 | |
| 34 | @Override |
| 35 | public synchronized Connection getConnection() throws NoConnectionException { |
| 36 | return null; |
| 37 | } |
| 38 | |
| 39 | @Override |
| 40 | public synchronized boolean hasConnection() { |
| 41 | return true; |
| 42 | } |
| 43 | |
| 44 | @Override |
| 45 | public synchronized void closeConnection() { |
| 46 | } |
| 47 | } |
nothing calls this directly
no outgoing calls
no test coverage detected