@Test public void applyUpdate() throws Exception { ContactRequestUpdate update = new ContactRequestUpdate(date, creator1); update.applyUpdate(mockRepos); verify(User.getPlaceholderAndScheduleQuery(creator1, mockUserRepository, u -> u.setRequesting(true))); }
@Override public void applyUpdate(RepositorySet repositorySet) { User user = repositorySet.userRepository.getUser(creator); if (user != null) repositorySet.userRepository.setIsRequesting(creator, true); else { User.getPlaceholderAndScheduleQuery(creator, repositorySet.userRepository, u -> u.setRequesting(true)); } }
ContactRequestUpdate extends Update { @Override public void applyUpdate(RepositorySet repositorySet) { User user = repositorySet.userRepository.getUser(creator); if (user != null) repositorySet.userRepository.setIsRequesting(creator, true); else { User.getPlaceholderAndScheduleQuery(creator, repositorySet.userRepository, u -> u.setRequesting(true)); } } }
ContactRequestUpdate extends Update { @Override public void applyUpdate(RepositorySet repositorySet) { User user = repositorySet.userRepository.getUser(creator); if (user != null) repositorySet.userRepository.setIsRequesting(creator, true); else { User.getPlaceholderAndScheduleQuery(creator, repositorySet.userRepository, u -> u.setRequesting(true)); } } ContactRequestUpdate(@JsonProperty("time-created") Date timeCreated,
                                @JsonProperty("creator") int creator); }
ContactRequestUpdate extends Update { @Override public void applyUpdate(RepositorySet repositorySet) { User user = repositorySet.userRepository.getUser(creator); if (user != null) repositorySet.userRepository.setIsRequesting(creator, true); else { User.getPlaceholderAndScheduleQuery(creator, repositorySet.userRepository, u -> u.setRequesting(true)); } } ContactRequestUpdate(@JsonProperty("time-created") Date timeCreated,
                                @JsonProperty("creator") int creator); @Override void applyUpdate(RepositorySet repositorySet); }
ContactRequestUpdate extends Update { @Override public void applyUpdate(RepositorySet repositorySet) { User user = repositorySet.userRepository.getUser(creator); if (user != null) repositorySet.userRepository.setIsRequesting(creator, true); else { User.getPlaceholderAndScheduleQuery(creator, repositorySet.userRepository, u -> u.setRequesting(true)); } } ContactRequestUpdate(@JsonProperty("time-created") Date timeCreated,
                                @JsonProperty("creator") int creator); @Override void applyUpdate(RepositorySet repositorySet);  }