diff options
Diffstat (limited to 'dblib')
-rw-r--r-- | dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/CachedDataSourceTest.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/CachedDataSourceTest.java b/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/CachedDataSourceTest.java index c463f38b..45268107 100644 --- a/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/CachedDataSourceTest.java +++ b/dblib/provider/src/test/java/org/onap/ccsdk/sli/core/dblib/CachedDataSourceTest.java @@ -1,10 +1,12 @@ package org.onap.ccsdk.sli.core.dblib; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import java.sql.SQLException; import java.sql.SQLFeatureNotSupportedException; import java.util.Properties; @@ -94,4 +96,26 @@ public class CachedDataSourceTest { assertEquals("passw0rd", ((JdbcDBCachedDataSource) ds).getDbPasswd()); assertEquals("testdb01", ((JdbcDBCachedDataSource) ds).toString()); } + + @Test + public void testIsInitialised() { + assertTrue(ds.isInitialized()); + } + + @Test + public void testIsWrapperFor() throws SQLException { + assertFalse(ds.isWrapperFor(CachedDataSource.class)); + } + + @Test + public void testGetSetNextErrorReportTime() throws SQLException { + ds.setNextErrorReportTime(1L); + assertEquals(1L, ds.getNextErrorReportTime()); + } + + @Test + public void testGetSetGlobalHostName() throws SQLException { + ds.setGlobalHostName("hostName"); + assertEquals("hostName", ds.getGlobalHostName()); + } }
\ No newline at end of file |