Merge branch 'release-0.9.6'
[Sone.git] / src / test / java / net / pterodactylus / sone / text / PlainTextPartTest.java
1 package net.pterodactylus.sone.text;
2
3 import static org.hamcrest.MatcherAssert.assertThat;
4 import static org.hamcrest.Matchers.is;
5
6 import org.junit.Test;
7
8 /**
9  * Unit test for {@link PlainTextPart}.
10  *
11  * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
12  */
13 public class PlainTextPartTest {
14
15         private final PlainTextPart part = new PlainTextPart("text");
16
17         @Test
18         public void textIsRetainedCorrectly() {
19                 assertThat(part.getText(), is("text"));
20         }
21
22         @Test(expected = NullPointerException.class)
23         public void nullIsNotAllowedForText() {
24             new PlainTextPart(null);
25         }
26
27 }