summaryrefslogtreecommitdiffstats
path: root/auth/auth-cass/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'auth/auth-cass/src/test/java')
-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()));
}
}