Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor device controller #985 #1167

Merged
merged 4 commits into from
Sep 8, 2022

Conversation

hocinehacherouf
Copy link
Contributor

Description

What's new?

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Tests
  • Other

@codecov
Copy link

codecov bot commented Sep 7, 2022

Codecov Report

Base: 87.60% // Head: 87.62% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (4a6ee69) compared to base (fa9aa17).
Patch coverage: 92.59% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1167      +/-   ##
==========================================
+ Coverage   87.60%   87.62%   +0.01%     
==========================================
  Files         199      200       +1     
  Lines        6744     6754      +10     
==========================================
+ Hits         5908     5918      +10     
  Misses        836      836              
Impacted Files Coverage Δ
...ub.Portal/Server/Services/DevicePropertyService.cs 92.30% <92.30%> (ø)
...ortal/Server/Controllers/v1.0/DevicesController.cs 100.00% <100.00%> (+6.18%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

{
// Arrange
_ = this.mockDeviceService.Setup(c => c.GetDeviceTwin("aaa"))
.ReturnsAsync((Twin)null);

Check warning

Code scanning / CodeQL

Useless upcast

There is no need to upcast from [null](1) to [Twin](2) - the conversion can be done implicitly.
{
// Arrange
_ = this.mockDeviceService.Setup(c => c.GetDeviceTwin("aaa"))
.ReturnsAsync((Twin)null);

Check warning

Code scanning / CodeQL

Useless upcast

There is no need to upcast from [null](1) to [Twin](2) - the conversion can be done implicitly.
@hocinehacherouf hocinehacherouf marked this pull request as ready for review September 7, 2022 18:25
@hocinehacherouf hocinehacherouf requested a review from a team as a code owner September 7, 2022 18:25
@kbeaugrand kbeaugrand merged commit b56d262 into main Sep 8, 2022
@kbeaugrand kbeaugrand deleted the feature/985_refactor_device_controller branch September 8, 2022 09:26
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.

Refactor DevicesController
2 participants