kontent-ai / model-generator-net

Kontent.ai .NET model generator.
https://www.nuget.org/packages/Kontent.Ai.ModelGenerator
MIT License
17 stars 19 forks source link

Feature/180 test coverage #181

Closed Sevitas closed 1 year ago

Sevitas commented 1 year ago

Motivation

Fixes #180

Checklist

How to test

Everything works as before

codecov[bot] commented 1 year ago

Codecov Report

Merging #181 (51a5837) into master (18051c6) will increase coverage by 3.37%. The diff coverage is 97.80%.

:exclamation: Current head 51a5837 differs from pull request most recent head 1ca7e53. Consider uploading reports for the commit 1ca7e53 to get more accurate results

@@            Coverage Diff             @@
##           master     #181      +/-   ##
==========================================
+ Coverage   90.52%   93.90%   +3.37%     
==========================================
  Files          33       35       +2     
  Lines        1246     1280      +34     
  Branches      128      130       +2     
==========================================
+ Hits         1128     1202      +74     
+ Misses        117       55      -62     
- Partials        1       23      +22     
Impacted Files Coverage Δ
...tent.Ai.ModelGenerator/FileSystemOutputProvider.cs 100.00% <ø> (ø)
.../Kontent.Ai.ModelGenerator.Core/Common/Property.cs 98.80% <83.33%> (+1.19%) :arrow_up:
...ontent.Ai.ModelGenerator.Core/CodeGeneratorBase.cs 80.72% <94.73%> (+26.77%) :arrow_up:
...Generator.Core/Common/ClassCodeGeneratorFactory.cs 100.00% <100.00%> (ø)
...t.Ai.ModelGenerator.Core/Common/ClassDefinition.cs 100.00% <100.00%> (+13.15%) :arrow_up:
...delGenerator.Core/Common/ClassDefinitionFactory.cs 100.00% <100.00%> (ø)
...nt.Ai.ModelGenerator.Core/DeliveryCodeGenerator.cs 100.00% <100.00%> (+26.31%) :arrow_up:
...i.ModelGenerator.Core/DeliveryCodeGeneratorBase.cs 100.00% <100.00%> (+12.00%) :arrow_up:
...delGenerator.Core/ExtendedDeliveryCodeGenerator.cs 92.30% <100.00%> (+7.69%) :arrow_up:
...rators/Class/ExtendedDeliveryClassCodeGenerator.cs 100.00% <100.00%> (ø)
... and 4 more

... and 7 files with indirect coverage changes

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

Simply007 commented 1 year ago

Validate whether make CodeGeneratorBase non-abstract, or extract logi to some provider for the common logic.

Sevitas commented 1 year ago

Validate whether make CodeGeneratorBase non-abstract, or extract logi to some provider for the common logic.

Add also tests for the Property.FromContentTypeElement methods