Examples of TagImpl


Examples of org.apache.rave.portal.model.impl.TagImpl

    @Test
    @Transactional
    @Rollback(true)
    public void delete_invalid(){
        String keyword = "abdhjdhlnews";
        TagImpl tag = new TagImpl(keyword);
        assertNotNull(tag);
        repository.delete(tag);
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.TagImpl

        verify(repository);
    }


    private static Tag createTag(String keyword) {
        TagImpl tag = new TagImpl(keyword);
        return tag;
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.TagImpl

    }

    @Override
    public TagImpl convert(Tag tag) {
        String id = tag.getId() == null ? generateId() : tag.getId();
        return new TagImpl(id, tag.getKeyword());
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.TagImpl

    }

    private Tag getTag(String keyword) {
        Tag tag = tagService.getTagByKeyword(keyword);
        if (tag == null) {
            tag = new TagImpl();
            tag.setKeyword(keyword);
        }
        return tag;
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.TagImpl

        String keyword = "misc";
        // make sure we do have a tag with the keyword in the db
        JpaTag control = (JpaTag)repository.getByKeyword(keyword);
        assertNotNull(control);
        // create a tag with the keyword not of JpaTag.class for branch coverage
        TagImpl tag = new TagImpl(keyword);
        assertNotNull(tag);
        repository.delete(tag);
        assertNull(repository.getByKeyword(keyword));
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.TagImpl

    @Test
    @Transactional
    @Rollback(true)
    public void delete_invalid(){
        String keyword = "abdhjdhlnews";
        TagImpl tag = new TagImpl(keyword);
        assertNotNull(tag);
        repository.delete(tag);
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.TagImpl

    @Autowired
    JpaTagConverter jpaTagConverter;

    @Test
    public void convert_valid_tagImpl(){
        TagImpl tag = new TagImpl("blazer", new ArrayList<WidgetTag>());
        JpaTag jpaTag = jpaTagConverter.convert(tag);
        assertNotNull(jpaTag);
        assertEquals(tag.getKeyword(), jpaTag.getKeyword());
        assertEquals(tag.getWidgets().size(), jpaTag.getWidgets().size());
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.TagImpl

    @Test
    public void saveWidgetTag() {
        try {

            WidgetTagImpl wtag = new WidgetTagImpl();
            TagImpl tag = new TagImpl();
            wtag.setTag(tag);
            expect(widgetTagRepository.save(wtag)).andReturn(wtag);
            replay(widgetTagRepository);

            widgetTagService.saveWidgetTag(wtag);
View Full Code Here

Examples of org.apache.rave.portal.model.impl.TagImpl

        verify(repository);
    }


    private static Tag createTag(String keyword) {
        TagImpl tag = new TagImpl();
        tag.setKeyword(keyword);
        return tag;
    }
View Full Code Here

Examples of org.apache.rave.portal.model.impl.TagImpl

    @Autowired
    JpaTagConverter jpaTagConverter;

    @Test
    public void convert_valid_tagImpl(){
        TagImpl tag = new TagImpl("blazer");
        JpaTag jpaTag = jpaTagConverter.convert(tag);
        assertNotNull(jpaTag);
        assertEquals(tag.getKeyword(), jpaTag.getKeyword());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.