use of org.asqatasun.entity.contract.Scope in project Asqatasun by Asqatasun.
the class PageListControllerTest method setUpActDataService.
/**
* @param isActSiteScope
*/
private void setUpActDataService(boolean isActSiteScope) {
Scope mockGroupOfPagesScope = new Scope();
mockGroupOfPagesScope.setCode(ScopeEnum.GROUPOFPAGES);
Scope mockSiteScope = new Scope();
mockSiteScope.setCode(ScopeEnum.DOMAIN);
Contract mockContract = new Contract();
Act mockAct = new Act();
if (isActSiteScope) {
mockAct.setScope(mockSiteScope);
} else {
mockAct.setScope(mockGroupOfPagesScope);
}
GregorianCalendar calendar = new GregorianCalendar();
calendar.set(2030, 01, 01);
mockContract.setEndDate(calendar.getTime());
mockContract.setUser(mockUser);
mockContract.setLabel("CONTRACT LABEL");
mockContract.setId(1L);
mockAct.setContract(mockContract);
when(mockActDataService.getActFromAudit(mockAudit)).thenReturn(mockAct);
}
use of org.asqatasun.entity.contract.Scope in project Asqatasun by Asqatasun.
the class ScopeFactory method createScope.
public Scope createScope(ScopeEnum scopeCode) {
Scope scope = create();
scope.setLabel(scopeCode.name());
scope.setCode(scopeCode);
return scope;
}