@Test public void itHasADescription() throws Exception { final XmlsonObject representation = presenter.present(attachment); assertThat(representation.getString("description"), is("My receipt.")); }
@Test public void itHasASize() throws Exception { final XmlsonObject representation = presenter.present(attachment); assertThat(representation.getInteger("size"), is(284569)); }
@Test public void itHasAContentType() throws Exception { final XmlsonObject representation = presenter.present(attachment); assertThat(representation.getString("content-type"), is("application/pdf")); }
@Test public void itHasAFilename() throws Exception { final XmlsonObject representation = presenter.present(attachment); assertThat(representation.getString("filename"), is("receipt.pdf")); }
@Test public void itHasAGuid() throws Exception { final XmlsonObject representation = presenter.present(attachment); assertThat(representation.getString("guid"), is("1234567890")); }
@Test public void itIsNamedAttachment() throws Exception { final XmlsonObject representation = presenter.present(attachment); assertThat(representation.getName(), is("attachment")); }