1 package net.pterodactylus.sone.text;
3 import static org.hamcrest.MatcherAssert.assertThat;
4 import static org.hamcrest.Matchers.is;
9 * Unit test for {@link PlainTextPart}.
11 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
13 public class PlainTextPartTest {
15 private final PlainTextPart part = new PlainTextPart("text");
18 public void textIsRetainedCorrectly() {
19 assertThat(part.getText(), is("text"));
22 @Test(expected = NullPointerException.class)
23 public void nullIsNotAllowedForText() {
24 new PlainTextPart(null);