Skip to content
This repository was archived by the owner on Nov 6, 2023. It is now read-only.

Conversation

@OctaviPascual
Copy link

@OctaviPascual OctaviPascual commented Oct 1, 2020

Implement video description updater command.

I guess the difficult part would be to implement a handler that doesn't just print a message but that has to interact with persistence 😅
Maybe later in the course I try to implement more things 🙂

Copy link
Member

@rgomezcasas rgomezcasas left a comment

Choose a reason for hiding this comment

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

Do the unit tests also 😬

}

public static Video updateDescription(VideoTitle title, VideoDescription description) {
var video = new Video(title, description);
Copy link
Member

Choose a reason for hiding this comment

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

In aggregates you can mutate the state, so instead of being this method static you could:

  • First search for the Video
  • then video.updateDescription(newDescription)

import java.util.Set;

public class VideoDescriptionUpdaterCliController {
Copy link
Member

Choose a reason for hiding this comment

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

Is this working 👀

@rgomezcasas rgomezcasas closed this Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

2 participants