Update test coverage
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
//CipherStreamJava/src/test/java/com/mattrixwv/cipherstream/exceptions/TestInvalidBaseException.java
|
||||
//Mattrixwv
|
||||
// Created: 04-14-23
|
||||
//Modified: 04-14-23
|
||||
package com.mattrixwv.cipherstream.exceptions;
|
||||
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
public class TestInvalidBaseException{
|
||||
private String message = "message";
|
||||
private Throwable cause = new Exception();
|
||||
|
||||
|
||||
@Test
|
||||
public void testConstructors(){
|
||||
InvalidBaseException exception = new InvalidBaseException();
|
||||
assertNull(exception.getMessage());
|
||||
assertNull(exception.getCause());
|
||||
|
||||
exception = new InvalidBaseException(message);
|
||||
assertEquals(message, exception.getMessage());
|
||||
assertNull(exception.getCause());
|
||||
|
||||
exception = new InvalidBaseException(cause);
|
||||
assertEquals(cause.toString(), exception.getMessage());
|
||||
assertEquals(cause, exception.getCause());
|
||||
|
||||
exception = new InvalidBaseException(message, cause);
|
||||
assertEquals(message, exception.getMessage());
|
||||
assertEquals(cause, exception.getCause());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user