keenlabs / keen-sdk-net

A .NET SDK for the Keen IO API
MIT License
37 stars 23 forks source link

Project settings file tests, move to json format #115

Closed baumatron closed 7 years ago

baumatron commented 7 years ago

This moves to only support a json-formatted config file, which @Donistivanov first implemented and was an awesome idea.

In the process, ported the old tests, and then removed them. Added new tests for reading from json files.

Also consolidated a bit of duplicated code and simplified how ProjectSettingsProviderFile did initialization.

Note that this changes behavior of the ProjectSettingsProvider constructor, as it will now throw if you don't provide a project id. The members are protected, and we'd only throw if you tried to new up a KeenClient with that invalid ProjectSettingsProvider. I think it's better to disallow creating a provider that has invalid state.

Fixes #109

baumatron commented 7 years ago

Travis CI from my fork: https://travis-ci.org/baumatron/keen-sdk-net/builds/260424622?utm_source=github_status&utm_medium=notification

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 57.28% when pulling d358d87096db83385b2d8c469496268d254b7cdf on proj_settings_file_tests into 81188a0f548897092df59e431674f5216d2829b4 on dotnetsummer.