Package ru.org.linux.user

Examples of ru.org.linux.user.UserDao


    String memberName = Parser.escape(txtNode.getText()).trim();
    TagNode tagNode = (TagNode)node;
    RootNode rootNode = tagNode.getRootNode();
    ToHtmlFormatter toHtmlFormatter = rootNode.getToHtmlFormatter();
    boolean secure = rootNode.isSecure();
    UserDao userDao = rootNode.getUserDao();
    String result;
    try {
      if(userDao != null && toHtmlFormatter != null){
        User user = rootNode.getUserDao().getUser(memberName);
        if (!user.isBlocked()) {
View Full Code Here


  private User isden;  // Заблокированный пользователь
  private LorCodeService lorCodeService;

  @Before
  public void initTest() throws Exception {
    UserDao userDao = mock(UserDao.class);
    User splinter = mock(User.class);

    maxcom = mock(User.class);
    JB = mock(User.class);
    isden = mock(User.class);

    when(maxcom.isBlocked()).thenReturn(false);
    when(JB.isBlocked()).thenReturn(false);
    when(isden.isBlocked()).thenReturn(true);
    when(maxcom.getNick()).thenReturn("maxcom");
    when(JB.getNick()).thenReturn("JB");
    when(isden.getNick()).thenReturn("isden");

    when(splinter.isBlocked()).thenReturn(false);
    when(splinter.getNick()).thenReturn("splinter");
    when(userDao.getUser("splinter")).thenReturn(splinter);

    when(userDao.getUser("maxcom")).thenReturn(maxcom);
    when(userDao.getUser("JB")).thenReturn(JB);
    when(userDao.getUser("isden")).thenReturn(isden);
    when(userDao.getUser("hizel")).thenThrow(new UserNotFoundException("hizel"));

    String mainUrl = "http://127.0.0.1:8080/";
    URI mainURI = new URI(mainUrl, true, "UTF-8");

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

  private LorCodeService lorCodeService;
  private String url;

  @Before
  public void init() throws Exception {
    UserDao userDao = mock(UserDao.class);

    String mainUrl = "http://127.0.0.1:8080/";
    URI mainURI = new URI(mainUrl, true, "UTF-8");
    SiteConfig siteConfig = mock(SiteConfig.class);
    when(siteConfig.getMainURI()).thenReturn(mainURI);
View Full Code Here

    return new SectionDaoImpl();
  }

  @Bean
  public UserDao userDao() {
    return new UserDao();
  }
View Full Code Here

public class CodeTagTest {
  private LorCodeService lorCodeService;

  @Before
  public void init() throws Exception {
    UserDao userDao = mock(UserDao.class);

    String mainUrl = "http://127.0.0.1:8080/";
    URI mainURI = new URI(mainUrl, true, "UTF-8");
    SiteConfig siteConfig = mock(SiteConfig.class);
    when(siteConfig.getMainURI()).thenReturn(mainURI);
View Full Code Here

    ImmutableList<String> tags = ImmutableList.of("one", "two");
    Topic message = mock(Topic.class);

    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);
View Full Code Here

TOP

Related Classes of ru.org.linux.user.UserDao

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.