Skip to content

Conversation

@angularsen
Copy link
Owner

@angularsen angularsen commented Oct 4, 2020

Improve test coverage with +2.65% up to 83.11% by testing generated code that take the UnitSystem as parameter.

https://codecov.io/gh/angularsen/UnitsNet/pull/844/changes

  • Add new test base class UnitsNet.Tests.TestsBase.QuantityTestsBase with abstract bool SupportsSIUnitSystem { get; }
  • Declare SI unit system compatibility for each quantity's base test class
  • Generate test cases for ctor, As() and ToBaseUnit()
  • Remove duplicate, hard coded test cases in QuantityTests.Ctor.cs
  • Define base units for Volume.CubicMeter in order to pass test, seemed missing

@angularsen angularsen changed the title Add unit system tests Improve test coverage of quantity methods with unit system parameter Oct 4, 2020
@angularsen
Copy link
Owner Author

Not sure why codecov bot does'nt create the report, maybe because I only touched test-code.
Coverage is up 2.65% to 83.11%

https://codecov.io/gh/angularsen/UnitsNet/pull/844/changes

@angularsen angularsen merged commit df6eafb into master Nov 13, 2020
@angularsen angularsen deleted the add-unitsystem-tests branch November 13, 2020 21:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants