mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-26 01:10:39 +00:00
MeteringScreenLayoutFeature
tests
This commit is contained in:
parent
539e6f2a8f
commit
83dd6228cf
1 changed files with 31 additions and 0 deletions
31
test/data/models/metering_screen_layout_config_test.dart
Normal file
31
test/data/models/metering_screen_layout_config_test.dart
Normal file
|
@ -0,0 +1,31 @@
|
|||
import 'package:lightmeter/data/models/metering_screen_layout_config.dart';
|
||||
import 'package:test/test.dart';
|
||||
|
||||
void main() {
|
||||
test('fromJson', () {
|
||||
expect(
|
||||
MeteringScreenLayoutConfigJson.fromJson({'0': true, '1': true}),
|
||||
{
|
||||
MeteringScreenLayoutFeature.extremeExposurePairs: true,
|
||||
MeteringScreenLayoutFeature.filmPicker: true,
|
||||
},
|
||||
);
|
||||
expect(
|
||||
MeteringScreenLayoutConfigJson.fromJson({'0': false, '1': false}),
|
||||
{
|
||||
MeteringScreenLayoutFeature.extremeExposurePairs: false,
|
||||
MeteringScreenLayoutFeature.filmPicker: false,
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
test('toJson', () {
|
||||
expect(
|
||||
{
|
||||
MeteringScreenLayoutFeature.extremeExposurePairs: true,
|
||||
MeteringScreenLayoutFeature.filmPicker: true,
|
||||
}.toJson(),
|
||||
{'0': true, '1': true},
|
||||
);
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue