This repository was archived by the owner on Feb 22, 2023. It is now read-only.
Commit 31b46eb
committed
[image_picker] Switch unit tests to mock plaform implementation
`image_picker`'s app-facing tests were never updated during federation to
use a mock platform implementation, and instead were still mocking method
channels. That makes them fragile to implementation details of the
default method channel implementation that is part of another package,
and thus subject to breakage when the method channel changes.
This converts them to using a mock platform implementation, so it's only
testing the layer within this package.
Removes some tests that were testing things that only made sense at the
method channel layer.
Adds argument assertions that there were tests for, but were previously
only enforced in the implementations. As these are API constraints, they
should be enforced at the API layer, not at each implementation's layer
as they currently are.1 parent 4479e26 commit 31b46eb
6 files changed
Lines changed: 475 additions & 572 deletions
File tree
- packages/image_picker/image_picker
- lib
- test
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
1 | 8 | | |
2 | 9 | | |
3 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
210 | 221 | | |
211 | 222 | | |
212 | 223 | | |
| |||
245 | 256 | | |
246 | 257 | | |
247 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
248 | 270 | | |
249 | 271 | | |
250 | 272 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
0 commit comments