mirror of
https://github.com/vodemn/m3_lightmeter.git
synced 2024-11-23 16:00:41 +00:00
tests
This commit is contained in:
parent
80fe288bd0
commit
34da381b11
1 changed files with 19 additions and 0 deletions
|
@ -164,6 +164,25 @@ void main() {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
group('stopType', () {
|
||||||
|
test('get default', () {
|
||||||
|
when(() => sharedPreferences.getInt(UserPreferencesService.stopTypeKey)).thenReturn(null);
|
||||||
|
expect(service.stopType, StopType.third);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('get', () {
|
||||||
|
when(() => sharedPreferences.getInt(UserPreferencesService.stopTypeKey)).thenReturn(1);
|
||||||
|
expect(service.stopType, StopType.half);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('set', () {
|
||||||
|
when(() => sharedPreferences.setInt(UserPreferencesService.stopTypeKey, 0))
|
||||||
|
.thenAnswer((_) => Future.value(true));
|
||||||
|
service.stopType = StopType.full;
|
||||||
|
verify(() => sharedPreferences.setInt(UserPreferencesService.stopTypeKey, 0)).called(1);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
group('meteringScreenLayout', () {
|
group('meteringScreenLayout', () {
|
||||||
test('get default', () {
|
test('get default', () {
|
||||||
when(
|
when(
|
||||||
|
|
Loading…
Reference in a new issue