[camerax] Adds proxy class for testing detached/mock objects and method calls#5423
Merged
camsim99 merged 57 commits intoflutter:mainfrom Nov 27, 2023
Merged
[camerax] Adds proxy class for testing detached/mock objects and method calls#5423camsim99 merged 57 commits intoflutter:mainfrom
camsim99 merged 57 commits intoflutter:mainfrom
Conversation
bparrishMines
approved these changes
Nov 22, 2023
Contributor
bparrishMines
left a comment
There was a problem hiding this comment.
LGTM with a couple notes
packages/camera/camera_android_camerax/lib/src/android_camera_camerax.dart
Outdated
Show resolved
Hide resolved
|
|
||
| // Tell plugin to create mock/detached objects and stub method calls for the | ||
| // testing of createCamera. | ||
| camera.proxy = CameraXProxy( |
Contributor
There was a problem hiding this comment.
It looks like you are setting default values in multiple tests. You could probably create a TestCameraXProxy or create a method that sets the default mock value classes.
Contributor
Author
There was a problem hiding this comment.
There are small differences between the proxies and I did originally try using a method to do something like you suggested, but it became more confusing almost to keep track of IMO so I'm going to leave this as is for now.
…camerax.dart Co-authored-by: Maurice Parrish <[email protected]>
engine-flutter-autoroll
added a commit
to engine-flutter-autoroll/flutter
that referenced
this pull request
Nov 27, 2023
auto-submit bot
pushed a commit
to flutter/flutter
that referenced
this pull request
Nov 27, 2023
flutter/packages@97f0a40...e774e88 2023-11-27 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.5 to 2.22.8 (flutter/packages#5472) 2023-11-27 [email protected] Roll Flutter from cf05f3c to b5f163a (3 revisions) (flutter/packages#5477) 2023-11-27 [email protected] [camerax] Adds proxy class for testing detached/mock objects and method calls (flutter/packages#5423) 2023-11-24 [email protected] Roll Flutter from 106667e to cf05f3c (10 revisions) (flutter/packages#5474) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
11 tasks
caseycrogers
pushed a commit
to caseycrogers/flutter
that referenced
this pull request
Dec 29, 2023
flutter/packages@97f0a40...e774e88 2023-11-27 49699333+dependabot[bot]@users.noreply.github.com Bump github/codeql-action from 2.22.5 to 2.22.8 (flutter/packages#5472) 2023-11-27 [email protected] Roll Flutter from cf05f3c to b5f163a (3 revisions) (flutter/packages#5477) 2023-11-27 [email protected] [camerax] Adds proxy class for testing detached/mock objects and method calls (flutter/packages#5423) 2023-11-24 [email protected] Roll Flutter from 106667e to cf05f3c (10 revisions) (flutter/packages#5474) If this roll has caused a breakage, revert this CL and stop the roller using the controls here: https://autoroll.skia.org/r/flutter-packages-flutter-autoroll Please CC [email protected],[email protected] on the revert to ensure that a human is aware of the problem. To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose To report a problem with the AutoRoller itself, please file a bug: https://issues.skia.org/issues/new?component=1389291&template=1850622 Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Closed
12 tasks
16 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Creates
CameraXProxyclass used to test detached/mock objects and method calls in the plugin. Refactors plugin test to use the proxy.Part of flutter/flutter#125928; unblocks #5285 which requires testing a mixture of detached and mock objects.
Pre-launch Checklist
dart format.)[shared_preferences]pubspec.yamlwith an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.mdto add a description of the change, following repository CHANGELOG style.///).