-
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
How do I test the things #1062
Comments
Hi @M-Zuber, we're using NSubstitute. But I'm confused by what you wrote. Are you saying that if you pass something other than null you get a test failure? Or if you omit that last argument? Also, |
So NSubstitute takes a different tact to other mocking frameworks by making the proxy object transparent (no So from the value returned from
I gather this is occurring due to the overloads on Also, if an Happy to run up the tests myself in #1061 if there's a specific way to trigger what you're seeing. |
If I omit the last argument.
I was just following most other tests, where all that is being checked is the fact the correct url was touched.
It is being invoked and therefore failing as it sees the URI as null.
This sounds exactly right to me, a simple repro is too take the test here and remove the What is more confusing for me is that this line: |
So we have a few of these extension methods but I'm not sure whether we should: a) move them back into Favouring a) right now (I tested this with |
Opened #1063 to address this specific problem. Feedback/suggestions welcome. |
When writing unit tests, you have to write something like the following:
Without the null on the last line the test will fail on an
Ensure
check that the uri is null, but it is not clear why it is needed or what it does.I am mostly confident that the problem is not really with
octokit
but where can i go to better understand the tools being used?The text was updated successfully, but these errors were encountered: