File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
test/feature/domain/usecase/searchtopheadlinesnews Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ void main() {
1515 SearchTopHeadlinesNews searchTopHeadlinesNews;
1616 MockNewsRepository mockNewsRepository;
1717 final tKeyword = 'testKeyword' ;
18+ final tParamsSearchTopHeadlinesNews = ParamsSearchTopHeadlinesNews (keyword: tKeyword);
1819
1920 setUp (() {
2021 mockNewsRepository = MockNewsRepository ();
@@ -35,7 +36,7 @@ void main() {
3536 .thenAnswer ((_) async => Right (tTopHeadlinesNewsResponseModel));
3637
3738 // act
38- final result = await searchTopHeadlinesNews (ParamsSearchTopHeadlinesNews (keyword : tKeyword) );
39+ final result = await searchTopHeadlinesNews (tParamsSearchTopHeadlinesNews );
3940
4041 // assert
4142 expect (result, Right (tTopHeadlinesNewsResponseModel));
@@ -44,11 +45,21 @@ void main() {
4445 },
4546 );
4647
48+ test (
49+ 'make sure the props value' ,
50+ () async {
51+ // assert
52+ expect (
53+ tParamsSearchTopHeadlinesNews.props,
54+ [tParamsSearchTopHeadlinesNews.keyword],
55+ );
56+ },
57+ );
58+
4759 test (
4860 'make sure the output of the toString function' ,
4961 () async {
5062 // assert
51- final tParamsSearchTopHeadlinesNews = ParamsSearchTopHeadlinesNews (keyword: tKeyword);
5263 expect (
5364 tParamsSearchTopHeadlinesNews.toString (),
5465 'ParamsSearchTopHeadlinesNews{keyword: ${tParamsSearchTopHeadlinesNews .keyword }}' ,
You can’t perform that action at this time.
0 commit comments