Initial commit

This commit is contained in:
2024-04-07 19:41:57 -04:00
parent 2b3212cb44
commit 8f0d1c64bd
95 changed files with 6787 additions and 45 deletions

View File

@@ -0,0 +1,51 @@
package com.mattrixwv.cipherstream.exception;
import static org.junit.jupiter.api.Assertions.*;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
import org.mockito.junit.jupiter.MockitoExtension;
@Tag("unit-test")
@ExtendWith(MockitoExtension.class)
public class InvalidCipherParameterExceptionTest{
//Fields
private String message = "Error Message";
private Throwable cause = new Throwable();
@Test
public void testConstructor_default(){
InvalidCipherParameterException exception = new InvalidCipherParameterException();
assertNull(exception.getMessage());
assertNull(exception.getCause());
}
@Test
public void testConstructor_message(){
InvalidCipherParameterException exception = new InvalidCipherParameterException(message);
assertEquals(message, exception.getMessage());
assertNull(exception.getCause());
}
@Test
public void testConstructor_cause(){
InvalidCipherParameterException exception = new InvalidCipherParameterException(cause);
assertEquals(cause.toString(), exception.getMessage());
assertEquals(cause, exception.getCause());
}
@Test
public void testConstructor_messageCause(){
InvalidCipherParameterException exception = new InvalidCipherParameterException(message, cause);
assertEquals(message, exception.getMessage());
assertEquals(cause, exception.getCause());
}
}