Update test coverage

This commit is contained in:
2023-04-14 19:01:58 -04:00
parent bd086a2ab3
commit 575ff04ecd
8 changed files with 405 additions and 446 deletions

View File

@@ -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());
}
}