|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.krad.uif.util.UifUnitTestUtils
public final class UifUnitTestUtils
Utilities class for establishing a minimal environment for testing operations involving Uif components.
Constructor Summary | |
---|---|
UifUnitTestUtils()
|
Method Summary | |
---|---|
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 Properties |
getConfigProperties()
Get the config properties for the current thread. |
static org.springframework.web.context.WebApplicationContext |
getWebApplicationContext()
Get the web application context. |
static void |
tearDownMockConfig()
Shut down the mock configuration. |
static void |
tearDownMockUserSession()
Shut down the mock user session. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UifUnitTestUtils()
Method Detail |
---|
public static Properties getConfigProperties()
public static org.springframework.web.context.WebApplicationContext getWebApplicationContext()
public static void establishMockConfig(String applicationId) throws Exception
GlobalResourceLoader
to support the use of KRAD UIF components in unit tests.
applicationId
- The application ID for the fake environment.
Exception
public static void tearDownMockConfig() throws Exception
establishMockConfig(String)
is used with
BeforeClass
, then this method should be used with AfterClass
to tear down
resources.
Exception
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 void tearDownMockUserSession()
establishMockUserSession(String)
is used with
Before
, then this method should be used with After
to tear down resources.
public static ViewAuthorizer getAllowMostViewAuthorizer()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |