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

feat(chatbot-mobile)write test for chat models, chat remote datasource and chat bloc #68

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
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
Prev Previous commit
Update chat_institute_model_test.dart
Beki4382 authored Aug 1, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 5901fd23101405ac4090c17f4fbd5e756f218252
Original file line number Diff line number Diff line change
@@ -6,14 +6,14 @@ void main() {

final Map<String, dynamic> doctorData1 = {
'fullName': 'Dr. John Doe',
'photoUrl': 'https://example.com/doctor1.png',
'photoUrl': 'https://hakimhub.com/doctor1.png',
'id': 'doctor123',
'specialities': ['Pediatrics'],
};

final Map<String, dynamic> doctorData2 = {
'fullName': 'Dr. Jane Smith',
'photoUrl': 'https://example.com/doctor2.png',
'photoUrl': 'https://hakimhub.com/doctor2.png',
'id': 'doctor456',
'specialities': ['Cardiology'],
};
@@ -22,7 +22,7 @@ void main() {
final Map<String, dynamic> jsonData = {
'institutionName': 'Tikur Anbesa',
'id': '123456',
'logoUrl': 'https://example.com/logo.png',
'logoUrl': 'https://hakimhub.com/logo.png',
'doctors': [doctorData1, doctorData2]
};

@@ -40,7 +40,7 @@ void main() {
expect(result, isA<ChatInsituteModel>());
expect(result.instituteName, 'Tikur Anbesa');
expect(result.instituteId, '123456');
expect(result.logoUrl, 'https://example.com/logo.png');
expect(result.logoUrl, 'https://hakimhub.com/logo.png');
expect(result.doctors, expectedDoctors);
});

@@ -49,7 +49,7 @@ void main() {
final Map<String, dynamic> jsonDataWithoutDoctors = {
'institutionName': 'Tikur Anbesa',
'id': '123456',
'logoUrl': 'https://example.com/logo.png',
'logoUrl': 'https://hakimhub.com/logo.png',
'doctors': null,
};

@@ -60,7 +60,7 @@ void main() {
expect(result, isA<ChatInsituteModel>());
expect(result.instituteName, 'Tikur Anbesa');
expect(result.instituteId, '123456');
expect(result.logoUrl, 'https://example.com/logo.png');
expect(result.logoUrl, 'https://hakimhub.com/logo.png');
expect(result.doctors, []);
});

@@ -69,7 +69,7 @@ void main() {
final Map<String, dynamic> jsonDataWithEmptyDoctors = {
'institutionName': 'Tikur Anbesa',
'id': '123456',
'logoUrl': 'https://example.com/logo.png',
'logoUrl': 'https://hakimhub.com/logo.png',
'doctors': [],
};

@@ -80,7 +80,7 @@ void main() {
expect(result, isA<ChatInsituteModel>());
expect(result.instituteName, 'Tikur Anbesa');
expect(result.instituteId, '123456');
expect(result.logoUrl, 'https://example.com/logo.png');
expect(result.logoUrl, 'https://hakimhub.com/logo.png');
expect(result.doctors, []);
});
}