Package com.agiletec.plugins.jpcontentfeedback.aps.internalservlet.feedback

Examples of com.agiletec.plugins.jpcontentfeedback.aps.internalservlet.feedback.ContentFeedbackAction


      this.addParameter("selectedComment", listaIds.get(0));
      this.addParameter("vote", 2);
      result2 = this.executeAction();
      assertEquals(Action.SUCCESS, result2);

      ContentFeedbackAction action = (ContentFeedbackAction)this.getAction();
      IRating ratingConten_0 = action.getCommentRating(Integer.parseInt(listaIds.get(0)));
      assertNotNull(ratingConten_0);
      assertEquals(1, ratingConten_0.getVoters());
      assertEquals(2, ratingConten_0.getSumvote());

      IRating ratingConten_1 = action.getCommentRating(Integer.parseInt(listaIds.get(1)));
      assertNull(ratingConten_1);

      IRating ratingConten = action.getContentRating();
      assertNull(ratingConten);

    // Inserimento votazione su contenuto
      this.initAction("/do/jpcontentfeedback/FrontEnd/contentfeedback", "insertVote");
      this.setToken();
      this.addParameter("formContentId", contentId);
      this.addParameter("vote", 4);
      result2 = this.executeAction();
      assertEquals(Action.SUCCESS, result2);

      ContentFeedbackAction action_1 = (ContentFeedbackAction)this.getAction();
      ratingConten_0 = action_1.getCommentRating(Integer.parseInt(listaIds.get(0)));
      assertNotNull(ratingConten_0);
      assertEquals(1, ratingConten_0.getVoters());
      assertEquals(2, ratingConten_0.getSumvote());

//      ratingConten_1 = action.getCommentRating(Integer.parseInt(listaIds.get(1)));
View Full Code Here


      this.setToken();
      this.addParameter("formContentId", contentId);
      String result = this.executeAction();
      assertEquals(Action.SUCCESS, result);

      ContentFeedbackAction action = (ContentFeedbackAction)this.getAction();
      List<String> commentIds = action.getContentCommentIds();
      assertEquals(0, commentIds.size());

      this.initAction("/do/jpcontentfeedback/FrontEnd/contentfeedback", "insert");
      this.setToken();
      this.addParameter("formContentId", contentId);
      this.addParameter("title", "testTitle");
      this.addParameter("commentText", "testComment");
      this.setToken();
      result = this.executeAction();
      assertEquals(Action.SUCCESS, result);

      this.setUserOnSession("admin");
      this.initAction("/do/jpcontentfeedback/FrontEnd/contentfeedback", "intro");
      this.setToken();
      this.addParameter("formContentId", contentId);
      result = this.executeAction();
      assertEquals(Action.SUCCESS, result);

      action = (ContentFeedbackAction)this.getAction();
      action.setCurrentContentId(contentId);
      commentIds = action.getContentCommentIds();
      assertEquals(1, commentIds.size());

    } catch (Throwable t) {
      throw t;
    } finally{
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpcontentfeedback.aps.internalservlet.feedback.ContentFeedbackAction

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.