summaryrefslogtreecommitdiffstats
path: root/auth/auth-cass
diff options
context:
space:
mode:
authorJonathan Gathman <jonathan.gathman@att.com>2019-08-06 23:11:02 +0000
committerGerrit Code Review <gerrit@onap.org>2019-08-06 23:11:02 +0000
commit203d10d46676eb0a6661be8d4aa6ef8db2bbf4dc (patch)
tree816937279fdca88bc14ce7a5e8f1d63cef442ca4 /auth/auth-cass
parent54f1bd25e5a6fb84502d100dbb00e915d4be6556 (diff)
parentb40351eb57ab13a696aeae2ecf041366c445e127 (diff)
Merge "Add junits to batch & cass modules"
Diffstat (limited to 'auth/auth-cass')
-rw-r--r--auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/JU_DAOException.java28
1 files changed, 22 insertions, 6 deletions
diff --git a/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/JU_DAOException.java b/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/JU_DAOException.java
index 0e9d199d..0ee0ce8f 100644
--- a/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/JU_DAOException.java
+++ b/auth/auth-cass/src/test/java/org/onap/aaf/auth/dao/JU_DAOException.java
@@ -31,20 +31,36 @@ import org.onap.aaf.auth.dao.DAOException;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.modules.junit4.PowerMockRunner;
-@RunWith(PowerMockRunner.class)
public class JU_DAOException {
-DAOException daoException;
+ DAOException daoException;
- //DAOException daoException = new DAOException();
String message = "message";
Throwable cause;
@Before
public void setUp(){
- daoException = new DAOException();
+ daoException = new DAOException();
}
@Test
- public void test(){
- assertTrue(true);
+ public void testNoArgConstructor(){
+ assertNull(daoException.getMessage());
+ }
+
+ @Test
+ public void testOneArgConstructorMsg(){
+ daoException = new DAOException("test message");
+ assertTrue("test message".equalsIgnoreCase(daoException.getMessage()));
+ }
+
+ @Test
+ public void testOneArgConstructorThrowable(){
+ daoException = new DAOException(new Throwable());
+ assertTrue("java.lang.Throwable".equalsIgnoreCase(daoException.getMessage()));
+ }
+
+ @Test
+ public void testTwoArgConstructor(){
+ daoException = new DAOException("test message", new Throwable());
+ assertTrue("test message".equalsIgnoreCase(daoException.getMessage()));
}
}