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() {
15
15
SearchTopHeadlinesNews searchTopHeadlinesNews;
16
16
MockNewsRepository mockNewsRepository;
17
17
final tKeyword = 'testKeyword' ;
18
+ final tParamsSearchTopHeadlinesNews = ParamsSearchTopHeadlinesNews (keyword: tKeyword);
18
19
19
20
setUp (() {
20
21
mockNewsRepository = MockNewsRepository ();
@@ -35,7 +36,7 @@ void main() {
35
36
.thenAnswer ((_) async => Right (tTopHeadlinesNewsResponseModel));
36
37
37
38
// act
38
- final result = await searchTopHeadlinesNews (ParamsSearchTopHeadlinesNews (keyword : tKeyword) );
39
+ final result = await searchTopHeadlinesNews (tParamsSearchTopHeadlinesNews );
39
40
40
41
// assert
41
42
expect (result, Right (tTopHeadlinesNewsResponseModel));
@@ -44,11 +45,21 @@ void main() {
44
45
},
45
46
);
46
47
48
+ test (
49
+ 'make sure the props value' ,
50
+ () async {
51
+ // assert
52
+ expect (
53
+ tParamsSearchTopHeadlinesNews.props,
54
+ [tParamsSearchTopHeadlinesNews.keyword],
55
+ );
56
+ },
57
+ );
58
+
47
59
test (
48
60
'make sure the output of the toString function' ,
49
61
() async {
50
62
// assert
51
- final tParamsSearchTopHeadlinesNews = ParamsSearchTopHeadlinesNews (keyword: tKeyword);
52
63
expect (
53
64
tParamsSearchTopHeadlinesNews.toString (),
54
65
'ParamsSearchTopHeadlinesNews{keyword: ${tParamsSearchTopHeadlinesNews .keyword }}' ,
You can’t perform that action at this time.
0 commit comments