Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed and Added two new test. #8

Merged
merged 2 commits into from
Nov 10, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Replaced RestClient with MockClient in order to pass test.
Signed-off-by: Sahil Kumar <[email protected]>
  • Loading branch information
xsahil03x committed Oct 20, 2019
commit 15877dd13e13a54a208476307457a74adc719cfa
21 changes: 11 additions & 10 deletions test/api_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import 'package:flutter_devfest/network/index.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
group(("Api tests"), () {});
test(
"Fetch Speakers List",
() async {
IClient _client = RestClient();
final res = await _client.getAsync(HomeProvider.kConstGetSpeakersUrl);
print(res.mappedResult);
expect(res.networkServiceResponse.success, true);
},
);
group(("Api tests"), () {
test(
"Should Fetch Speakers List",
() async {
IClient _client = MockClient();
final res = await _client.getAsync(HomeProvider.kConstGetSpeakersUrl);
print(res.mappedResult);
expect(res.networkServiceResponse.success, isTrue);
},
);
});
}