Skip to content

Instantly share code, notes, and snippets.

@michaelajr
Created May 26, 2018 17:16
Show Gist options
  • Save michaelajr/2acb77663d59a7cc31948934b3d6a96d to your computer and use it in GitHub Desktop.
Save michaelajr/2acb77663d59a7cc31948934b3d6a96d to your computer and use it in GitHub Desktop.
Maven For Pipelining, Part 3
package com.eoniantech.echoapi.domain.model;
import org.junit.Test;
/**
* Test class for the {@link Message} model's constructor.
*
* @author Michael Andrews <Michael.Andrews@eoniantech.com>
* @since 1.0
*/
public class MessageTest_constructor {
@SuppressWarnings("unused")
private Message message;
@Test
public void testMessage() {
message = new Message("this is a message");
}
@Test(expected = IllegalArgumentException.class)
public void testMessage_null_message() {
message = new Message(null);
}
@Test(expected = IllegalArgumentException.class)
public void testMessage_empty_message() {
message = new Message("");
}
@Test(expected = IllegalArgumentException.class)
public void testMessage_empty_message_with_spaces() {
message = new Message(" ");
}
}
@michaelajr
Copy link
Author

michaelajr commented May 26, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment