use of org.olat.course.export.CourseEnvironmentMapper in project openolat by klemens.
the class KeyAndNameConverterTest method convertBusinessGroupKeyToKey.
@Test
public void convertBusinessGroupKeyToKey() {
CourseEnvironmentMapper envMapper = new CourseEnvironmentMapper();
MockBusinessGroup newGroup = new MockBusinessGroup(567l, "Group 1");
BusinessGroupReference bgRef = new BusinessGroupReference(newGroup, 345l, "Group 1");
envMapper.getGroups().add(bgRef);
String convertedExp = convertExpressionKeyToKey("inRightGroup(\"345\")", envMapper);
Assert.assertEquals("inRightGroup(\"567\")", convertedExp);
}
use of org.olat.course.export.CourseEnvironmentMapper in project openolat by klemens.
the class KeyAndNameConverterTest method convertGroupAndAreaKeyToKey_sameKey.
@Test
public void convertGroupAndAreaKeyToKey_sameKey() {
CourseEnvironmentMapper envMapper = new CourseEnvironmentMapper();
BGArea newArea = new MockArea(567l, "Area 1");
BGAreaReference areaRef = new BGAreaReference(newArea, 345l, "Area 1");
envMapper.getAreas().add(areaRef);
MockBusinessGroup newGroup = new MockBusinessGroup(568l, "Group 1");
BusinessGroupReference bgRef = new BusinessGroupReference(newGroup, 345l, "Group 1");
envMapper.getGroups().add(bgRef);
String convertedExp = convertExpressionKeyToKey("inLearningArea(\"345\") & inRightGroup(\"345\")", envMapper);
Assert.assertEquals("inLearningArea(\"567\") & inRightGroup(\"568\")", convertedExp);
}
Aggregations