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

InMemoryContracts.java:39-40: Implement method... #77

Closed
0pdd opened this issue May 23, 2020 · 6 comments
Closed

InMemoryContracts.java:39-40: Implement method... #77

0pdd opened this issue May 23, 2020 · 6 comments

Comments

@0pdd
Copy link

0pdd commented May 23, 2020

The puzzle 73-94622f1f from #73 has to be resolved:

* @todo #73:30min Implement method Contracts.addContract(...).
* Once we can test this class, write some unit tests for it.

The puzzle was created by @amihaiemil on 23-May-20.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

@0pdd
Copy link
Author

0pdd commented May 23, 2020

@amihaiemil please pay attention to this new issue.

@criske
Copy link
Contributor

criske commented May 23, 2020

sign me up :D

@amihaiemil
Copy link
Member

@criske Remember, you don't have to implement all the dependencies. Just implementing this method insinde InMemoryContracts is enough. It should first check if the Project and the Contributor exist in the Storage. If they do not exist, throw an exception. If they do, save the Contract and that's it.

@criske
Copy link
Contributor

criske commented May 23, 2020

Right now we can't get the Contributor from storage. Can I use a private placeholder with TODO inside InMemoryContracts to always return a contributor, until storage.contributors is added to API?

@amihaiemil
Copy link
Member

@criske When it comes to dependencies, there are 2 ways you can do it:

  1. Use mocks/placeholders and TODOs (your suggestion)
  2. Start with the dependencies instead. So even if the task says "implement method addContract", you can start implementing the Contributors Storage and leave a TODO to continue the initial task.

However you wish : D

@0pdd
Copy link
Author

0pdd commented May 23, 2020

The puzzle 73-94622f1f has disappeared from the source code, that's why I closed this issue. //cc @amihaiemil

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants