Updated libraries and increased test coverage

This commit is contained in:
2023-04-13 19:08:46 -04:00
parent d1b083f4de
commit f746f93427
11 changed files with 397 additions and 34 deletions

View File

@@ -0,0 +1,37 @@
//Matrix/src/test/java/com/mattrixwv/matrix/exceptions/TestInvalidCoordinatesException.java
//Mattrixwv
// Created: 04-13-23
//Modified: 04-13-23
package com.mattrixwv.matrix.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 TestInvalidCoordinatesException{
private String message = "message";
private Throwable cause = new Exception();
@Test
public void testConstructor(){
InvalidCoordinatesException exception = new InvalidCoordinatesException();
assertNull(exception.getMessage());
assertNull(exception.getCause());
exception = new InvalidCoordinatesException(message);
assertEquals(message, exception.getMessage());
assertNull(exception.getCause());
exception = new InvalidCoordinatesException(cause);
assertEquals(cause.toString(), exception.getMessage());
assertEquals(cause, exception.getCause());
exception = new InvalidCoordinatesException(message, cause);
assertEquals(message, exception.getMessage());
assertEquals(cause, exception.getCause());
}
}