-
Notifications
You must be signed in to change notification settings - Fork 23
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
Automated Unit Tests Have Poor Coverage #37
Comments
…the .NET4/4.5+/PCL libs: - We really need to centralize the creation of HttpClients for a number of reasons. - Issue #37 points out a reason: using http handlers, we can achieve way better CC numbers. - @baumatron already did some work in this area, so I want to cherry-pick his changes and use them to centralize lazy construction of an HttpClient for the various types of keys, or switch to using HttpRequestMessage in helpers to set the headers and other settings. - We then can build up the mock infrastructure around that to extend testing, including testing HTTP headers for all HTTP requests--e.g. ensuring the "Authorization" and "Keen-Sdk" headers are there, as well as others. Again locally @baumatron already did some of this, so I didn't do it here, but we'll get that cleaned up and checked in soon. - Also just not having this header-related code scattered everywhere.
For the purposes of |
Been pushing tests to |
Marking as closed with PR #127 since code coverage is increased quite a bit. There's still more that can be done, but that can be handled in newer specific issues. |
Unit tests don't actually exercise core components of the SDK. The EventCollection and Event classes are basically untested by automated testing.
A solution would be to do away with the UseMocks flag found in the tests, and use a mock HTTP protocol handler that would validate requests and provide canned responses.
The text was updated successfully, but these errors were encountered: