-
Notifications
You must be signed in to change notification settings - Fork 400
Rework of UnitsNetJsonConverter #746
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
Rework of UnitsNetJsonConverter #746
Conversation
…t up serialization and deserialization tests into seperate files for better readability and extracted test objects into their own classes. Consider this an overall clean-up of the test project
Codecov Report
@@ Coverage Diff @@
## master #746 +/- ##
==========================================
+ Coverage 61.92% 62.89% +0.96%
==========================================
Files 171 273 +102
Lines 38457 39630 +1173
==========================================
+ Hits 23814 24924 +1110
- Misses 14643 14706 +63
Continue to review full report at Codecov.
|
@angularsen If you want better code coverage, I could always update the unit tests to also test the actual converters. |
Okay, i'm adding tests for the converters themselves at the moment 😄 |
Okay, i'm done now 👍 |
Perfect, I'll try to take a look later today.
|
UnitsNet.Serialization.JsonNet.Tests/UnitsNetBaseJsonConverterTest.cs
Outdated
Show resolved
Hide resolved
UnitsNet.Serialization.JsonNet.Tests/UnitsNetBaseJsonConverterTest.cs
Outdated
Show resolved
Hide resolved
UnitsNet.Serialization.JsonNet.Tests/UnitsNetIComparableJsonConverterTest.cs
Show resolved
Hide resolved
UnitsNet.Serialization.JsonNet.Tests/UnitsNetIQuantityJsonConverterTest.cs
Show resolved
Hide resolved
Haha, that is fine by me 😆
In my experience, it is extremely rare that such constants in test code
change. When they do, either it is a matter of simple search/replace or
there is a bigger conceptual change that requires rewriting the tests
anyway. Time spent reading code vs writing code is probably some tens of
times more, so I always favor readability.
|
5cc5fc2
to
9e18710
Compare
Great job, thanks! |
Fixes #732.
Reworked UnitsNetJsonConverter according to #732.
Also split up serialization and deserialization tests into seperate files for better readability and extracted test objects into their own classes. Consider this an overall clean-up of the test project