Package com.agiletec.plugins.jpcontentfeedback.apsadmin.feedback

Examples of com.agiletec.plugins.jpcontentfeedback.apsadmin.feedback.ContentFeedbackAction


      this.setUserOnSession("admin");
      this.initAction("/do/jpcontentfeedback/Comments", "search");
      this.addParameter("status", "1");
      String result = this.executeAction();
      assertEquals(Action.SUCCESS, result);
      ContentFeedbackAction action = (ContentFeedbackAction)this.getAction();
      List<String> listaIds = action.getCommentIds();
      assertEquals(0, listaIds.size());
    } catch (Throwable t) {
      t.printStackTrace();
      throw t;
    }
View Full Code Here


      this.setUserOnSession("admin");
      this.initAction("/do/jpcontentfeedback/Comments", "search");
      this.addParameter("status", Comment.STATUS_TO_APPROVE);
      String result = this.executeAction();
      assertEquals(Action.SUCCESS, result);
      ContentFeedbackAction action = (ContentFeedbackAction)this.getAction();
      List<String> listaIds = action.getCommentIds();
      assertEquals(0, listaIds.size());

      comment = createNewComment();
      this._commentManager.addComment(comment);

      this.initAction("/do/jpcontentfeedback/Comments", "search");
      this.addParameter("status", Comment.STATUS_TO_APPROVE);
      result = this.executeAction();
      assertEquals(Action.SUCCESS, result);
      action = (ContentFeedbackAction)this.getAction();
      listaIds = action.getCommentIds();
      assertEquals(1, listaIds.size());

      this.initAction("/do/jpcontentfeedback/Comments", "view");
      this.addParameter("selectedComment", comment.getId());
      result = this.executeAction();
      assertEquals(Action.SUCCESS, result);
      action = (ContentFeedbackAction)this.getAction();
      assertNotNull(action.getComment());

      this.initAction("/do/jpcontentfeedback/Comments", "updateStatus");
      this.addParameter("selectedComment", comment.getId());
      this.addParameter("status", Comment.STATUS_APPROVED);
      result = this.executeAction();
      assertEquals(Action.SUCCESS, result);

      this.initAction("/do/jpcontentfeedback/Comments", "search");
      this.addParameter("status", Comment.STATUS_APPROVED);
      result = this.executeAction();
      assertEquals(Action.SUCCESS, result);
      action = (ContentFeedbackAction)this.getAction();
      listaIds = action.getCommentIds();
      assertEquals(1, listaIds.size());

      this.initAction("/do/jpcontentfeedback/Comments", "delete");
      this.addParameter("selectedComment", comment.getId());
      this.addParameter("strutsAction", ApsAdminSystemConstants.DELETE);
      result = this.executeAction();
      assertEquals(Action.SUCCESS, result);

      this.initAction("/do/jpcontentfeedback/Comments", "search");
      this.addParameter("status", Comment.STATUS_APPROVED);
      result = this.executeAction();
      assertEquals(Action.SUCCESS, result);
      action = (ContentFeedbackAction)this.getAction();
      listaIds = action.getCommentIds();
      assertEquals(0, listaIds.size());



    } catch (Throwable t) {
View Full Code Here

TOP

Related Classes of com.agiletec.plugins.jpcontentfeedback.apsadmin.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.