-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
95 additions
and
72 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -101,8 +101,10 @@ void main() { | |
final combinedContact = contact1.combine(contact2); | ||
|
||
expect(combinedContact.id, 'contact1'); | ||
expect(combinedContact.displayName, | ||
'Contact 1'); // Should keep contact1's name | ||
expect( | ||
combinedContact.displayName, | ||
'Contact 1', | ||
); // Should keep contact1's name | ||
|
||
// Should have merged emails | ||
expect(combinedContact.emails?.length, 2); | ||
|
@@ -427,7 +429,9 @@ void main() { | |
|
||
expect(emailToHashMap.keys.contains('[email protected]'), true); | ||
expect( | ||
emailToHashMap['[email protected]']?.length, 3); // One for each pepper | ||
emailToHashMap['[email protected]']?.length, | ||
3, | ||
); // One for each pepper | ||
}); | ||
}); | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -97,7 +97,7 @@ void main() { | |
|
||
test('should create a PhoneNumber instance with all fields', () { | ||
final thirdPartyIdToHashMap = { | ||
'phone': ['hash1', 'hash2'] | ||
'phone': ['hash1', 'hash2'], | ||
}; | ||
|
||
final phoneNumber = PhoneNumber( | ||
|
@@ -122,15 +122,15 @@ void main() { | |
matrixId: '@user:example.com', | ||
status: ThirdPartyStatus.active, | ||
thirdPartyIdToHashMap: { | ||
'phone': ['hash1', 'hash2'] | ||
'phone': ['hash1', 'hash2'], | ||
}, | ||
); | ||
|
||
expect(updatedPhoneNumber.number, '+1234567890'); | ||
expect(updatedPhoneNumber.matrixId, '@user:example.com'); | ||
expect(updatedPhoneNumber.status, ThirdPartyStatus.active); | ||
expect(updatedPhoneNumber.thirdPartyIdToHashMap, { | ||
'phone': ['hash1', 'hash2'] | ||
'phone': ['hash1', 'hash2'], | ||
}); | ||
|
||
// Original phoneNumber should remain unchanged | ||
|
@@ -186,7 +186,7 @@ void main() { | |
|
||
test('should create an Email instance with all fields', () { | ||
final thirdPartyIdToHashMap = { | ||
'email': ['hash1', 'hash2'] | ||
'email': ['hash1', 'hash2'], | ||
}; | ||
|
||
final email = Email( | ||
|
@@ -211,15 +211,15 @@ void main() { | |
matrixId: '@user:example.com', | ||
status: ThirdPartyStatus.active, | ||
thirdPartyIdToHashMap: { | ||
'email': ['hash1', 'hash2'] | ||
'email': ['hash1', 'hash2'], | ||
}, | ||
); | ||
|
||
expect(updatedEmail.address, '[email protected]'); | ||
expect(updatedEmail.matrixId, '@user:example.com'); | ||
expect(updatedEmail.status, ThirdPartyStatus.active); | ||
expect(updatedEmail.thirdPartyIdToHashMap, { | ||
'email': ['hash1', 'hash2'] | ||
'email': ['hash1', 'hash2'], | ||
}); | ||
|
||
// Original email should remain unchanged | ||
|
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
Oops, something went wrong.