public class UifUnitTestUtils extends Object
Constructor and Description |
---|
UifUnitTestUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
establishMockConfig(String applicationId)
Establish a Rice configuration providing enough mock services via
GlobalResourceLoader to support the use of KRAD UIF components in unit tests. |
static void |
establishMockUserSession(String principalName)
Establish a user session with the given principal name.
|
static ViewAuthorizer |
getAllowMostViewAuthorizer()
Get a view authorizer allowing most operations.
|
static Person |
getMockPerson(String id)
Get a mock person object for use in a JUnit test case.
|
public UifUnitTestUtils()
public static Person getMockPerson(String id)
id
- The ID to use for principal name, principal ID, and entity ID.public static void establishMockConfig(String applicationId)
GlobalResourceLoader
to support the use of KRAD UIF components in unit tests.applicationId
- The application ID for the fake environment.public static void establishMockUserSession(String principalName)
This method will use KIM API calls to look up a person with the provided principal name. Use
establishMockConfig(String)
to set up a mock KIM environment if needed.
principalName
- The principal name of the user to establish a session with.public static ViewAuthorizer getAllowMostViewAuthorizer()
Copyright © 2005-2015 The Kuali Foundation. All Rights Reserved.