-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Search/Users Api #289
Search/Users Api #289
Conversation
less than symbols were not being generated - subtle bug
@shiftkey ready for review 😄 |
var request = new SearchUsersRequest("github"); | ||
request.AccountType = AccountType.User; | ||
client.SearchUsers(request); | ||
connection.Received().GetAll<Repository>(Arg.Is<Uri>(u => u.ToString() == "search/users"), Arg.Any<Dictionary<string, string>>()); |
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.
These tests are failing because the .GetAll<Repository>
should be .GetAll<User>
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.
My bad - that's been fixed now.
@hahmed one of the things I'd like to challenge you on is how those unit tests actually validate the parameters you set in the query. So we have a test like this:
We know that the
cc @alfhenrik as this is relevant to #290 |
👍 |
When i get a moment tomorrow i will look at this. I agree the qualifiers should be tested a bit better. |
@shiftkey I agree - I will implement this as per your suggestion. |
connection.Received().GetAll<User>(Arg.Is<Uri>(u => u.ToString() == "search/users"), Arg.Any<Dictionary<string, string>>()); | ||
connection.Received().GetAll<User>(Arg.Is<Uri>(u => u.ToString() == "search/users"), | ||
Arg.Is<Dictionary<string, string>>(d => | ||
d["q"] == "something_random" |
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 should be "something"
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.
@shiftkey thanks, nearly ready for review now, just updated all tests. I am rebasing now too.
@shiftkey ready for review. |
{ | ||
public SearchUsersRequest(string term) | ||
:base(term) |
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.
A 💄 change - bring this back up to the previous line and let the :
breathe with some whitespace
There's a few failing tests here because the enum types, such as |
@shiftkey thank's will fix them, to be honest I cannot see any failing tests (I mentioned this last time), everything just keeps on passing for some reason, I need to look into why I cannot see any failing tests, something must be broken with my scripts (I never made any updates to that at all). |
@shiftkey now that I have merged into master, I can run .\build,cmd and I can see 11 failing tests - oh my 😄 |
@shiftkey that's all done now. All tests are passing, anything else I missed, please let me know. |
Lol... amazing! |
#276