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 LinkPart}.
11 * @author <a href="mailto:bombe@pterodactylus.net">David ‘Bombe’ Roden</a>
13 public class LinkPartTest {
15 private final LinkPart part = new LinkPart("link", "text", "title");
18 public void linkIsRetainedCorrectly() {
19 assertThat(part.getLink(), is("link"));
23 public void textIsRetainedCorrectly() {
24 assertThat(part.getText(), is("text"));
28 public void titleIsRetainedCorrectly() {
29 assertThat(part.getTitle(), is("title"));
33 public void textIsUsedAsTitleIfNoTitleIsGiven() {
34 assertThat(new LinkPart("link", "text").getTitle(), is("text"));