Created
July 27, 2020 03:54
-
-
Save danahartweg/f66ec83d00ef0db4e2f4c9591d816dcb to your computer and use it in GitHub Desktop.
Item list test - Support boolean properties to flutter_bloc_list_manager
This file contains 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
blocTest( | |
'returns source items matching a single active boolean condition key', | |
build: () async { | |
whenListen( | |
_filterConditionsBloc, | |
Stream.value( | |
ConditionsInitialized( | |
activeConditions: <String>{ | |
generateConditionKey('conditional', 'True'), | |
}, | |
availableConditions: {}, | |
), | |
), | |
); | |
whenListen(_searchQueryBloc, Stream.value('')); | |
whenListen( | |
_sourceBloc, | |
Stream.value( | |
MockSourceBlocClassItems([_mockItem1, _mockItem2, _mockItem3]), | |
), | |
); | |
return ItemListBloc<MockItemClass, MockSourceBlocClassItems>( | |
filterConditionsBloc: _filterConditionsBloc, | |
searchQueryBloc: _searchQueryBloc, | |
sourceBloc: _sourceBloc, | |
); | |
}, | |
expect: [ | |
ItemResults([_mockItem1, _mockItem3]) | |
], | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment