use of org.eclipse.sw360.datahandler.TEnumToString in project sw360portal by sw360.
the class WhenComputePermissions method the_highest_allowed_action_is_computed_for_user_$_with_user_group_$_and_department_$.
public WhenComputePermissions the_highest_allowed_action_is_computed_for_user_$_with_user_group_$_and_department_$(@Quoted String userEmail, @TEnumToString UserGroup userGroup, @Quoted String userDept) {
final User user = new User(DUMMY_ID, userEmail, userDept).setUserGroup(userGroup);
final DocumentPermissions<Project> projectDocumentPermissions = PermissionUtils.makePermission(project, user);
allowedActions = projectDocumentPermissions.getAllAllowedActions();
return self();
}
use of org.eclipse.sw360.datahandler.TEnumToString in project sw360portal by sw360.
the class WhenComputeVisibility method the_visibility_is_computed_for_department_$_and_user_group_$.
public WhenComputeVisibility the_visibility_is_computed_for_department_$_and_user_group_$(@Quoted String department, @TEnumToString UserGroup userGroup) {
final User user = new User(DUMMY_ID, DUMMY_MAIL, department).setUserGroup(userGroup);
isVisible = ProjectPermissions.isVisible(user).test(project);
return self();
}
use of org.eclipse.sw360.datahandler.TEnumToString in project sw360portal by sw360.
the class WhenComputeClearingState method the_release_clearing_state_is_set_to.
public WhenComputeClearingState the_release_clearing_state_is_set_to(@TEnumToString ClearingState clearingState) {
Release release = getFirstRelease();
Mockito.when(release.getClearingState()).thenReturn(clearingState);
the_clearing_state_is_computed_for(lastTestedClearingTeam);
return self();
}
use of org.eclipse.sw360.datahandler.TEnumToString in project sw360portal by sw360.
the class WhenComputeClearingState method team_$_sets_fossology_status_to.
public WhenComputeClearingState team_$_sets_fossology_status_to(@Quoted String clearingTeam, @TEnumToString FossologyStatus fossologyStatus) {
Release release = getFirstRelease();
Map<String, FossologyStatus> clearingTeamToFossologyStatus = release.getClearingTeamToFossologyStatus();
clearingTeamToFossologyStatus.put(clearingTeam, fossologyStatus);
the_clearing_state_is_computed_for(lastTestedClearingTeam);
return self();
}
Aggregations