-
Notifications
You must be signed in to change notification settings - Fork 53
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
Ic added rest client factory #145
Conversation
Assert.Throws<ArgumentException>(() => usersClient.Update(new User())); | ||
} | ||
|
||
[Test()] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test is key to demonstrate the power of the new pattern
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, this was something I noticed when browsing the codebase. Making things more testable is certainly a good idea.
I have a few of questions for discussion:
-
Do we really need the factory. Could we inject a Rest client directly? Seems like the factory is just a container for
BASE_URL
-
Are we able to make this change in a backward compatible way? Overloaded constructors and defaulting to constructing our own client may be possible and would allow us to avoid the major version change.
-
If we cant avoid the major version change, are there any other major changes we want to make? We dont want to break all our clients and then break them again in a few weeks
Hey Jack, thanks for the feedback, this is great! To address your points:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Why?
How?