Skip to content

Conversation

@Philip-Wang01
Copy link
Contributor

@Philip-Wang01 Philip-Wang01 commented Aug 15, 2024

Related #10773

Proposed changes

  • Add unit test CompositionDesignerTests.cs for public properties and method of the CompositionDesigner.
  • Enable nullability in CompositionDesigner.
Microsoft Reviewers: Open in CodeFlow

@codecov
Copy link

codecov bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.02363%. Comparing base (e4085eb) to head (25d4500).
Report is 28 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #11888         +/-   ##
===================================================
+ Coverage   75.01536%   75.02363%   +0.00826%     
===================================================
  Files           3047        3048          +1     
  Lines         631584      631629         +45     
  Branches       46764       46767          +3     
===================================================
+ Hits          473785      473871         +86     
+ Misses        154434      154397         -37     
+ Partials        3365        3361          -4     
Flag Coverage Δ
Debug 75.02363% <100.00000%> (+0.00826%) ⬆️
integration 17.93684% <ø> (+0.00243%) ⬆️
production 48.14191% <ø> (+0.01727%) ⬆️
test 97.01537% <100.00000%> (-0.00110%) ⬇️
unit 45.14067% <ø> (+0.01453%) ⬆️

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

ricardobossan

This comment was marked as duplicate.

@LeafShi1
Copy link
Member

@Tanya-Solyanik @lonitra The class CompositionDesigner does not implement any functions, and there is no place to call it in the entire Winform repo. Do we need to add unit tests for it?

@Tanya-Solyanik
Copy link
Contributor

@Tanya-Solyanik @lonitra The class CompositionDesigner does not implement any functions, and there is no place to call it in the entire Winform repo. Do we need to add unit tests for it?

Good point! Let's add a single test to indicate that this is not implemented, something like this -

    [Fact]
    public void Designer_ThrowsNotImplementedException()
    {
        using ComponentDocumentDesigner designer = new();
        using Timer timer = new();
        designer.Initialize(timer);
        designer.Invoking(d => d.Component).Should().Throw<NotImplementedException>();
     }

@Tanya-Solyanik Tanya-Solyanik added the waiting-author-feedback The team requires more information from the author label Aug 16, 2024
@dotnet-policy-service dotnet-policy-service bot removed the waiting-author-feedback The team requires more information from the author label Aug 20, 2024
@lonitra lonitra merged commit 9df46fa into dotnet:main Aug 21, 2024
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0 Preview1 milestone Aug 21, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Sep 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants