NodeExceptionTest: use lombok's val
Signed-off-by: Paul Campbell <pcampbell@kemitix.net>
This commit is contained in:
parent
58363e474d
commit
24ad03ccab
1 changed files with 3 additions and 9 deletions
|
@ -1,7 +1,6 @@
|
||||||
package net.kemitix.node;
|
package net.kemitix.node;
|
||||||
|
|
||||||
import net.kemitix.node.NodeException;
|
import lombok.val;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
import static org.hamcrest.CoreMatchers.is;
|
import static org.hamcrest.CoreMatchers.is;
|
||||||
|
@ -14,20 +13,15 @@ import static org.junit.Assert.assertThat;
|
||||||
*/
|
*/
|
||||||
public class NodeExceptionTest {
|
public class NodeExceptionTest {
|
||||||
|
|
||||||
/**
|
|
||||||
* Class under test.
|
|
||||||
*/
|
|
||||||
private NodeException nodeException;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test that message provided to constructor is returned.
|
* Test that message provided to constructor is returned.
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void shouldReturnConstructorMessage() {
|
public void shouldReturnConstructorMessage() {
|
||||||
//given
|
//given
|
||||||
final String message = "this is the message";
|
val message = "this is the message";
|
||||||
//when
|
//when
|
||||||
nodeException = new NodeException(message);
|
val nodeException = new NodeException(message);
|
||||||
//then
|
//then
|
||||||
assertThat(nodeException.getMessage(), is(message));
|
assertThat(nodeException.getMessage(), is(message));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue