@Test public void doChangeUserDontExists() { when(scoreDirector.lookUpWorkingObjectOrReturnNull(user)).thenReturn(null); change.doChange(scoreDirector); verify(scoreDirector, never()).beforeProblemPropertyChanged(any()); verify(scoreDirector, never()).afterProblemPropertyChanged(any()); verify(scoreDirector, never()).triggerVariableListeners(); }
@Override public void doChange(ScoreDirector<TaskAssigningSolution> scoreDirector) { final User workingUser = scoreDirector.lookUpWorkingObjectOrReturnNull(user); if (workingUser == null) { return; } scoreDirector.beforeProblemPropertyChanged(workingUser); workingUser.setEnabled(false); scoreDirector.afterProblemPropertyChanged(workingUser); releaseNonPinnedTasks(workingUser, scoreDirector); scoreDirector.triggerVariableListeners(); }
DisableUserProblemFactChange implements ProblemFactChange<TaskAssigningSolution> { @Override public void doChange(ScoreDirector<TaskAssigningSolution> scoreDirector) { final User workingUser = scoreDirector.lookUpWorkingObjectOrReturnNull(user); if (workingUser == null) { return; } scoreDirector.beforeProblemPropertyChanged(workingUser); workingUser.setEnabled(false); scoreDirector.afterProblemPropertyChanged(workingUser); releaseNonPinnedTasks(workingUser, scoreDirector); scoreDirector.triggerVariableListeners(); } }
DisableUserProblemFactChange implements ProblemFactChange<TaskAssigningSolution> { @Override public void doChange(ScoreDirector<TaskAssigningSolution> scoreDirector) { final User workingUser = scoreDirector.lookUpWorkingObjectOrReturnNull(user); if (workingUser == null) { return; } scoreDirector.beforeProblemPropertyChanged(workingUser); workingUser.setEnabled(false); scoreDirector.afterProblemPropertyChanged(workingUser); releaseNonPinnedTasks(workingUser, scoreDirector); scoreDirector.triggerVariableListeners(); } DisableUserProblemFactChange(User user); }
DisableUserProblemFactChange implements ProblemFactChange<TaskAssigningSolution> { @Override public void doChange(ScoreDirector<TaskAssigningSolution> scoreDirector) { final User workingUser = scoreDirector.lookUpWorkingObjectOrReturnNull(user); if (workingUser == null) { return; } scoreDirector.beforeProblemPropertyChanged(workingUser); workingUser.setEnabled(false); scoreDirector.afterProblemPropertyChanged(workingUser); releaseNonPinnedTasks(workingUser, scoreDirector); scoreDirector.triggerVariableListeners(); } DisableUserProblemFactChange(User user); User getUser(); @Override void doChange(ScoreDirector<TaskAssigningSolution> scoreDirector); }
DisableUserProblemFactChange implements ProblemFactChange<TaskAssigningSolution> { @Override public void doChange(ScoreDirector<TaskAssigningSolution> scoreDirector) { final User workingUser = scoreDirector.lookUpWorkingObjectOrReturnNull(user); if (workingUser == null) { return; } scoreDirector.beforeProblemPropertyChanged(workingUser); workingUser.setEnabled(false); scoreDirector.afterProblemPropertyChanged(workingUser); releaseNonPinnedTasks(workingUser, scoreDirector); scoreDirector.triggerVariableListeners(); } DisableUserProblemFactChange(User user); User getUser(); @Override void doChange(ScoreDirector<TaskAssigningSolution> scoreDirector);  }