Surreal-Net / Surreal.Net

Database driver for SurrealDB available for REST and RPC sessions.
Apache License 2.0
57 stars 7 forks source link

Added Conversion tests #52

Closed Du-z closed 2 years ago

Du-z commented 2 years ago

Added tests for all of the JsonConverters

All go green except for TimeSpan, ran out of time. #53 created to fix.

ProphetLamb commented 2 years ago

Thanks for the PR, as always. I am about to rewrite the parsers using Sprache, basically Nom for C#. I think ill abuse your PR for that ;) https://github.com/sprache/Sprache

codecov[bot] commented 2 years ago

Codecov Report

Merging #52 (f4ef2c3) into master (48ed57b) will increase coverage by 7.93%. The diff coverage is 78.94%.

:exclamation: Current head f4ef2c3 differs from pull request most recent head 96f9f64. Consider uploading reports for the commit 96f9f64 to get more accurate results

@@            Coverage Diff             @@
##           master      #52      +/-   ##
==========================================
+ Coverage   58.01%   65.95%   +7.93%     
==========================================
  Files          27       30       +3     
  Lines        1534     1645     +111     
==========================================
+ Hits          890     1085     +195     
+ Misses        644      560      -84     
Flag Coverage Δ
unittests 65.95% <78.94%> (+7.93%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/Json/Constants.cs 100.00% <ø> (ø)
src/Json/Numbers/DecimalConv.cs 53.12% <ø> (ø)
src/Json/Numbers/DoubleConv.cs 62.50% <ø> (ø)
src/Json/Numbers/SingleConv.cs 62.50% <ø> (ø)
src/Common/TimeZoneHelper.cs 12.50% <12.50%> (ø)
src/Json/Time/DateTimeConv.cs 51.51% <41.66%> (ø)
src/Json/Time/TimeSpanConv.cs 60.00% <60.00%> (ø)
src/Json/Time/TimeOnlyConv.cs 63.63% <63.63%> (ø)
src/Json/Time/DateTimeOffsetConv.cs 63.88% <73.33%> (ø)
src/Json/Time/DateOnlyConv.cs 63.63% <75.00%> (ø)
... and 11 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more