Search in sources :

Example 1 with Scope

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);
}
Also used : Act(org.asqatasun.entity.contract.Act) Scope(org.asqatasun.entity.contract.Scope) Contract(org.asqatasun.entity.contract.Contract)

Example 2 with Scope

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;
}
Also used : Scope(org.asqatasun.entity.contract.Scope)

Aggregations

Scope (org.asqatasun.entity.contract.Scope)2 Act (org.asqatasun.entity.contract.Act)1 Contract (org.asqatasun.entity.contract.Contract)1