Package org.encuestame.persistence.domain.security

Examples of org.encuestame.persistence.domain.security.Account


        final Long idUser = secUsers.getUid();
        // final String username = secUsers.getUsername();
        final UserAccountBean user = ConvertDomainBean
                .convertSecondaryUserToUserBean(secUsers);
        securityService.deleteUser(user);
        final Account userRetrieve = getAccountDao().getUserById(idUser);
        assertNull(userRetrieve);
    }
View Full Code Here


    @Test
    @Category(DefaultTest.class)
    public void testRemoveUnconfirmedAccount() {
        final Calendar createdAt = Calendar.getInstance();
        createdAt.add(Calendar.DATE, -2);
        final Account acc1 = createAccount(Boolean.TRUE);
        createUserAccount(Boolean.FALSE, createdAt.getTime(), "diana", acc1);
        createUserAccount(Boolean.FALSE, createdAt.getTime(), "paola", acc1);
        createUserAccount(Boolean.FALSE, createdAt.getTime(), "isabella", acc1);
        securityService.removeUnconfirmedAccount(Boolean.FALSE);
        // System.out.println("UserAccount without to set --->"+ msg);
        assertEquals(acc1.getEnabled(), Boolean.FALSE);
    }
View Full Code Here

    /**
     * Create account.
     * @return {@link Account}
     */
    public Account createAccount(){
        Account user = new Account();
        user.setEnabled(Boolean.TRUE);
        user.setCreatedAccount(new Date());
        getAccountDao().saveOrUpdate(user);
        return user;
    }
View Full Code Here

     * Create account with customized enabled.
     * @param enabled cuztomized enabled.
     * @return {@link Account}.
     */
    public Account createAccount(final Boolean enabled){
       final Account account = this.createAccount();
       account.setEnabled(enabled);
       getAccountDao().saveOrUpdate(account);
       return account;
    }
View Full Code Here

     * @param twitterAccount account
     * @param twitterPassword password
     * @return {@link Account}
     */
    public Account createUser(final String twitterAccount, final String twitterPassword){
        Account user = new Account();
        getAccountDao().saveOrUpdate(user);
        return user;
    }
View Full Code Here

    /**
     * Test Get total usage by hashTag.
     */
    @Test
    public void testGetTotalUsageByHashTag() {
        final Account account = createAccount();
        final HashTag hashtag1 = createHashTag("romantic");

        final Question question = createQuestion("What is your favorite type of movies?", "");
        final Date myDate = new Date();
        // TweetPoll
View Full Code Here

     * @param daysFromStart
     * @return
     * @throws EnMeNoResultsFoundException
     */
    private List<Notification> filterByDate(final Date daysFromStart, final Date daysFromEnd) throws EnMeNoResultsFoundException{
        final Account account = getUserAccount(getUserPrincipalUsername()).getAccount();
         final List<Notification> list = getNotificationDao()
                 .loadNotificationByDate(
                         account,
                         this.maxByCategory,
                         EnMeUtils.DEFAULT_START,
View Full Code Here

     *
     */
    @Test
    public void testQuickService() throws IOException, EnMeNoResultsFoundException, ParseException{
       
      final Account account = createAccount();
        final UserAccount userAccount = getSpringSecurityLoggedUserAccount();
       
        createHashTag("nicaragua");
        final Question question = createQuestion("Has scala great future as program language?", account);
        createQuestion("What is your favorite program language?", account);
View Full Code Here

   * @throws EnMeExpcetion
   */
  @Category(DefaultTest.class)
  public void testSaveTweetId() throws EnMeExpcetion {
    Question questionSave = createQuestion("how much or How Many?", "html");
    final Account usersave = createUser("dianmora", "xxxxxxx");
    final UserAccount account = createUserAccount("jota", usersave);
    final String tweetUrl = "http://www.encuestame.org";
    final TweetPoll tweetPoll = createTweetPollPublicated(true, true,
        new Date(), account, questionSave);

    answersSaveTweet = new ArrayList<QuestionAnswerBean>();
    answersSaveTweet.add(createAnswersBean("GBHD", "Maybe",
        questionSave.getQid()));
    answersSaveTweet.add(createAnswersBean("GTJU", "Yes",
        questionSave.getQid()));

    questionBean = createUnitQuestionBean(questionSave.getQuestion(), 1L,
        usersave.getUid(), answersSaveTweet);
    final TweetPollBean unitTweetPoll = createUnitTweetPollPublicated(
        new Date(), true, tweetUrl, usersave.getUid(),
        this.questionBean, null);
    unitTweetPoll.setId(tweetPoll.getTweetPollId());
    // final String s =
    // this.tweetPollService.generateTweetPollText(unitTweetPoll, tweetUrl);
    // final Status status = this.tweetPollService.publicTweetPoll(s,
View Full Code Here

    /**
    *Test Sec User Domain.
    */
    @Test
    public void testSecUser(){
        final Account user = new Account();
         getAccountDao().saveOrUpdate(user);
        assertNotNull(user.getUid());
    }
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.security.Account

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.