Skip to content

Improve test coverage of quantity methods with unit system parameter - #844

Merged
angularsen merged 6 commits into
masterfrom
add-unitsystem-tests
Nov 13, 2020
Merged

Improve test coverage of quantity methods with unit system parameter#844
angularsen merged 6 commits into
masterfrom
add-unitsystem-tests

Conversation

@angularsen

@angularsenangularsen commented Oct 4, 2020

Copy link
Copy Markdown
Owner

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

@angularsenangularsen changed the title Add unit system testsImprove test coverage of quantity methods with unit system parameterOct 4, 2020
@angularsen

Copy link
Copy Markdown
OwnerAuthor

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 masterNov 13, 2020
@angularsen
angularsen deleted the add-unitsystem-tests branch November 13, 2020 21:58
Sign up for freeto 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.

1 participant

@angularsen