dependency updates
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
* Copyright 2019 Joern Muehlencord (joern@muehlencord.de).
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@ -15,38 +15,38 @@
|
||||
*/
|
||||
package de.muehlencord.shared.util;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Joern Muehlencord (joern@muehlencord.de)
|
||||
*/
|
||||
public class StringEncodingExceptionTest {
|
||||
|
||||
class StringEncodingExceptionTest {
|
||||
|
||||
|
||||
@Test
|
||||
void testDefaultConstructor() {
|
||||
StringEncodingException ex = new StringEncodingException();
|
||||
assertEquals(StringEncodingException.DEFAULT_MSG, ex.getMessage());
|
||||
}
|
||||
|
||||
@Test
|
||||
void testMessageConstructor() {
|
||||
String msg = "Test message";
|
||||
StringEncodingException ex = new StringEncodingException(msg);
|
||||
assertEquals(ex.getMessage(), msg);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
void testRootcauseConstructor() {
|
||||
String msg = "Test message";
|
||||
StringEncodingException rootCause = new StringEncodingException();
|
||||
StringEncodingException ex = new StringEncodingException(msg, rootCause);
|
||||
assertEquals(ex.getMessage(), msg);
|
||||
assertEquals(ex.getCause(), rootCause);
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testDefaultConstructor() {
|
||||
StringEncodingException ex = new StringEncodingException();
|
||||
assertTrue (ex.getMessage().equals (StringEncodingException.DEFAULT_MSG));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMessageConstructor() {
|
||||
String msg = "Test message";
|
||||
StringEncodingException ex = new StringEncodingException(msg);
|
||||
assertTrue (ex.getMessage().equals (msg));
|
||||
}
|
||||
|
||||
|
||||
@Test
|
||||
public void testRootcauseConstructor() {
|
||||
String msg = "Test message";
|
||||
StringEncodingException rootCause = new StringEncodingException();
|
||||
StringEncodingException ex = new StringEncodingException(msg, rootCause);
|
||||
assertTrue (ex.getMessage().equals (msg));
|
||||
assertTrue (ex.getCause().equals (rootCause));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user