Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DST-16098 Send Domain Event when username is changed #797

Merged
merged 6 commits into from
Aug 22, 2024

Conversation

robertmccormackbconline
Copy link
Contributor

Send Domain Event when username is changed

@marcus-bcl marcus-bcl changed the title DST-16098 DST-16098 Send Domain Event when username is changed Aug 20, 2024
Copy link
Contributor

@marcus-bcl marcus-bcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple more minor things after seeing the changes - but looks good.

Might be worth adding a test for this too? To check that a domain event entity is saved when we rename someone - you should be able to add it to the existing userCanBeRenamed test.

import static java.util.Optional.ofNullable;

@Component
public class DomainEventTransformer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we delete this class now?

Comment on lines 263 to 264
public void save(String existingUsername, UserEntry user) throws JsonProcessingException
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry - could we annotate insertDomainEvent with @SneakyThrows so that we don't have to declare this exception all the way up?

Suggested change
public void save(String existingUsername, UserEntry user) throws JsonProcessingException
{
public void save(String existingUsername, UserEntry user)
{

@NoArgsConstructor
@AllArgsConstructor
@Builder
public class DomainEvent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we delete this now too?

@robertmccormackbconline robertmccormackbconline merged commit 4eca260 into main Aug 22, 2024
4 checks passed
@robertmccormackbconline robertmccormackbconline deleted the feature/DST-16098 branch August 22, 2024 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants