Search in sources :

Example 1 with Triple

use of org.hibernate.envers.internal.tools.Triple in project CzechIdMng by bcvsolutions.

the class ScriptEvaluatorTest method createThreeScripts.

/**
 * Method create three unique script with same code and name. Script body isn't filled.
 *
 * @return
 */
private Triple<IdmScriptDto, IdmScriptDto, IdmScriptDto> createThreeScripts() {
    String codeName1 = "script_name_" + System.currentTimeMillis();
    IdmScriptDto script1 = new IdmScriptDto();
    script1.setCategory(IdmScriptCategory.DEFAULT);
    script1.setCode(codeName1);
    script1.setName(codeName1);
    script1 = this.scriptService.save(script1);
    // 
    String codeName2 = "script_name_" + System.currentTimeMillis();
    IdmScriptDto script2 = new IdmScriptDto();
    script2.setCategory(IdmScriptCategory.DEFAULT);
    script2.setCode(codeName2);
    script2.setName(codeName2);
    script2 = this.scriptService.save(script2);
    // 
    String codeName3 = "script_name_" + System.currentTimeMillis();
    IdmScriptDto script3 = new IdmScriptDto();
    script3.setCategory(IdmScriptCategory.DEFAULT);
    script3.setCode(codeName3);
    script3.setName(codeName3);
    script3 = this.scriptService.save(script3);
    // 
    return new Triple<IdmScriptDto, IdmScriptDto, IdmScriptDto>(script1, script2, script3);
}
Also used : Triple(org.hibernate.envers.internal.tools.Triple) IdmScriptDto(eu.bcvsolutions.idm.core.api.dto.IdmScriptDto)

Aggregations

IdmScriptDto (eu.bcvsolutions.idm.core.api.dto.IdmScriptDto)1 Triple (org.hibernate.envers.internal.tools.Triple)1