Search in sources :

Example 1 with TagPageDAO

use of org.mamute.dao.TagPageDAO in project mamute by caelum.

the class TagPageDAOTest method should_get_tag_page_by_tag.

@Test
public void should_get_tag_page_by_tag() {
    TagPageDAO tagPages = new TagPageDAO(session);
    Tag java = tag("java");
    session.save(java);
    tagPages.save(new TagPage(java, notMarked("aboutaboutaboutaboutaboutaboutaboutaboutaboutaboutaboutaboutaboutaboutaboutaboutaboutaboutaboutabout")));
    TagPage javaPage = tagPages.findByTag(java.getName());
    assertEquals(java.getName(), javaPage.getTagName());
}
Also used : TagPageDAO(org.mamute.dao.TagPageDAO) Tag(org.mamute.model.Tag) TagPage(org.mamute.model.TagPage) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 TagPageDAO (org.mamute.dao.TagPageDAO)1 Tag (org.mamute.model.Tag)1 TagPage (org.mamute.model.TagPage)1