use of com.agiletec.aps.system.RequestContext in project entando-core by entando.
the class TestDataObjectDispenser method testGetUnauthorizedContent.
public void testGetUnauthorizedContent() throws Throwable {
RequestContext reqCtx = this.getRequestContext();
DataObjectRenderizationInfo outputInfo = this._dataObjectDispenser.getRenderizationInfo("ART104", 2, "it", reqCtx);
assertEquals("Current user 'guest' can't view this DataObject", outputInfo.getRenderedDataobject().trim());
this.setUserOnSession("editorCustomers");
outputInfo = this._dataObjectDispenser.getRenderizationInfo("ART104", 2, "it", reqCtx);
assertEquals("Current user 'editorCustomers' can't view this DataObject", outputInfo.getRenderedDataobject().trim());
this.setUserOnSession("supervisorCustomers");
outputInfo = this._dataObjectDispenser.getRenderizationInfo("ART104", 2, "it", reqCtx);
assertEquals("Current user 'supervisorCustomers' can't view this DataObject", outputInfo.getRenderedDataobject().trim());
}
Aggregations