com.atlassian.jira.user
Class MockApplicationUser

java.lang.Object
  extended by com.atlassian.jira.user.DelegatingApplicationUser
      extended by com.atlassian.jira.user.MockApplicationUser
All Implemented Interfaces:
ApplicationUser, Principal

public class MockApplicationUser
extends DelegatingApplicationUser

A convenient mock for ApplicationUser.

Since:
v6.0

Constructor Summary
MockApplicationUser(String username)
          Uses the lowercase form of the supplied username as the key.
MockApplicationUser(String userKey, String username)
          Uses the given key as-is.
MockApplicationUser(String username, String displayName, String email)
          Uses the lowercase form of the supplied username as the key.
MockApplicationUser(String userKey, String username, String displayName, String email)
          Uses the given key as-is.
 
Method Summary
 
Methods inherited from class com.atlassian.jira.user.DelegatingApplicationUser
equals, getDirectoryId, getDirectoryUser, getDisplayName, getEmailAddress, getKey, getName, getUsername, hashCode, isActive, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MockApplicationUser

public MockApplicationUser(String username)
Uses the lowercase form of the supplied username as the key.

Parameters:
username - as for MockUser.MockUser(String)

MockApplicationUser

public MockApplicationUser(String username,
                           String displayName,
                           String email)
Uses the lowercase form of the supplied username as the key.

Parameters:
username - as for MockUser.MockUser(String,String,String)
displayName - as for MockUser.MockUser(String,String,String)
email - as for MockUser.MockUser(String,String,String)

MockApplicationUser

public MockApplicationUser(String userKey,
                           String username)
Uses the given key as-is.

Parameters:
userKey - desired user's Key, the value to be returned for ApplicationUser.getKey()
username - as for MockUser.MockUser(String)

MockApplicationUser

public MockApplicationUser(String userKey,
                           String username,
                           String displayName,
                           String email)
Uses the given key as-is.

Parameters:
userKey - desired user's Key, the value to be returned for ApplicationUser.getKey()
username - as for MockUser.MockUser(String,String,String)
displayName - as for MockUser.MockUser(String,String,String)
email - as for MockUser.MockUser(String,String,String)


Copyright © 2002-2014 Atlassian. All Rights Reserved.