Package ru.org.linux.topic

Examples of ru.org.linux.topic.TopicDao


  @Before
  public void init() throws Exception {

    URI mainURI = new URI("http://www.linux.org.ru/", true, "UTF-8");

    TopicDao messageDao = mock(TopicDao.class);
    Topic message1 = mock(Topic.class);
    Group group1 = mock(Group.class);
    Topic message2 = mock(Topic.class);
    Group group2 = mock(Group.class);
    Topic message3 = mock(Topic.class);
    Group group3 = mock(Group.class);
    Topic message12 = mock(Topic.class);
    Group group12 = mock(Group.class);
    Topic message15 = mock(Topic.class);
    Group group15 = mock(Group.class);
    Topic messageHistory = mock(Topic.class);
    Group groupHistory = mock(Group.class);
    CommentService commentService = mock(CommentService.class);

    Comment comment = mock(Comment.class);

    when(message1.getTitle()).thenReturn("привет1");
    when(message2.getTitle()).thenReturn("привет2");
    when(message3.getTitle()).thenReturn("привет3");
    when(message12.getTitle()).thenReturn("привет12");
    when(message15.getTitle()).thenReturn("привет15");
    when(messageHistory.getTitle()).thenReturn("привет история");
    when(group1.getUrl()).thenReturn("/news/debian/");
    when(group2.getUrl()).thenReturn("/forum/talks/");
    when(group3.getUrl()).thenReturn("/forum/general/");
    when(group12.getUrl()).thenReturn("/forum/security/");
    when(group15.getUrl()).thenReturn("/forum/linux-org-ru/");
    when(groupHistory.getUrl()).thenReturn("/news/kernel/");
    when(messageDao.getGroup(message1)).thenReturn(group1);
    when(messageDao.getGroup(message2)).thenReturn(group2);
    when(messageDao.getGroup(message3)).thenReturn(group3);
    when(messageDao.getGroup(message12)).thenReturn(group12);
    when(messageDao.getGroup(message15)).thenReturn(group15);
    when(messageDao.getGroup(messageHistory)).thenReturn(groupHistory);
    when(messageDao.getById(6753486)).thenReturn(message1);
    when(messageDao.getById(6893165)).thenReturn(message2);
    when(messageDao.getById(6890857)).thenReturn(message3);
    when(messageDao.getById(1948661)).thenReturn(message12);
    when(messageDao.getById(6944260)).thenReturn(message15);
    when(messageDao.getById(6992532)).thenReturn(messageHistory);
    when(commentService.getById(6892917)).thenReturn(comment);
    when(commentService.getById(1948675)).thenReturn(comment);
    when(commentService.getById(6944831)).thenReturn(comment);

    SiteConfig siteConfig = mock(SiteConfig.class);
View Full Code Here


    PollDao pollDao = mock(PollDao.class);
    GroupDao groupDao = mock(GroupDao.class);
    UserDao userDao = mock(UserDao.class);
    SectionDao sectionDao = mock(SectionDaoImpl.class);
    DeleteInfoDao deleteInfoDao = mock(DeleteInfoDao.class);
    TopicDao messageDao = mock(TopicDao.class);
    UserAgentDao userAgentDao = mock(UserAgentDao.class);

    when(message.getGroupId()).thenReturn(13); // group id 13

  }
View Full Code Here

TOP

Related Classes of ru.org.linux.topic.TopicDao

Copyright © 2018 www.massapicom. 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.