Closed nickmartin1ee7 closed 3 years ago
@nickmartin1ee7 Looks good, is there a way to test this though?
@nickmartin1ee7 Looks good, is there a way to test this though?
You're right. There should be a unit test to cover this scenario. Good catch!
I'm thinking if I can do it, but what's the meaning of FakeProjectManager class on Tests? Because just using new ProjectManager(...)
would do the work and it prevents the devs from changing the same code on multiple areas. If the fake is absolutely necessary, IMHO its entire code should be Inherit from Projects Manager because it knows what to do
.
Do you agree with me, @nickmartin1ee7?
Yeah, that's actually a testable class on its own. Making a fake for that was a mistake since we already pass in a fake repository. Not to mention I broke DRY principle making it.
Yeah, that's actually a testable class on its own. Making a fake for that was a mistake since we already pass in a fake repository. Not to mention I broke DRY principle making it.
May I open another two issues, one to remove fake classes and one to test the CreateProject method?
Yeah, that's actually a testable class on its own. Making a fake for that was a mistake since we already pass in a fake repository. Not to mention I broke DRY principle making it.
May I open another two issues, one to remove fake classes and one to test the CreateProject method?
Yeah. Since the create project is dependant on the other, I'd make it a single refactor user story.
@srjheam Can you review this so we can close this PR, and delete this branch?
Closes #28