public class

JiraTestUtil

extends Object
java.lang.Object
   ↳ com.atlassian.jira.JiraTestUtil

Summary

Constants
String TESTS_BASE
Public Constructors
JiraTestUtil()
Public Methods
static void loginUser(ApplicationUser user)
This method will login a user to the current webwork action context.
static void logoutUser(ApplicationUser user)
This method will logout a user to the current webwork action context.
static HttpServletResponse mockExpectedRedirect(String url)
static void resetRequestAndResponse()
static MockHttpServletResponse setupExpectedInternalRedirect(String url)
@Deprecated static MockHttpServletResponse setupExpectedRedirect(String url)
This method is deprecated. use #mockExpectedRedirect(String)
static MockHttpServletRequest setupGetContextPath(String contextPath)
static void setupMockSequenceUtil()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String TESTS_BASE

Constant Value: "com/atlassian/jira"

Public Constructors

public JiraTestUtil ()

Public Methods

public static void loginUser (ApplicationUser user)

This method will login a user to the current webwork action context.

Parameters
user The user to login, or null if you want to behave anonymously.

public static void logoutUser (ApplicationUser user)

This method will logout a user to the current webwork action context.

Parameters
user The user to logout

public static HttpServletResponse mockExpectedRedirect (String url)

public static void resetRequestAndResponse ()

public static MockHttpServletResponse setupExpectedInternalRedirect (String url)

Throws
IOException

@Deprecated public static MockHttpServletResponse setupExpectedRedirect (String url)

This method is deprecated.
use #mockExpectedRedirect(String)

Parameters
url expected url
Returns
  • mock response
Throws
IOException when error occurs

public static MockHttpServletRequest setupGetContextPath (String contextPath)

public static void setupMockSequenceUtil ()