@@ -13,6 +13,7 @@ void main() {
13
13
late HtEmailClient mockEmailClient;
14
14
late HtEmailRepository emailRepository;
15
15
16
+ const testSenderEmail
= '[email protected] ' ;
16
17
const testEmail
= '[email protected] ' ;
17
18
const testOtpCode = '123456' ;
18
19
const testTemplateId = 'd-otp-template' ;
@@ -33,6 +34,7 @@ void main() {
33
34
// Arrange
34
35
when (
35
36
() => mockEmailClient.sendTransactionalEmail (
37
+ senderEmail: any (named: 'senderEmail' ),
36
38
recipientEmail: any (named: 'recipientEmail' ),
37
39
templateId: any (named: 'templateId' ),
38
40
templateData: any (named: 'templateData' ),
@@ -41,6 +43,7 @@ void main() {
41
43
42
44
// Act
43
45
await emailRepository.sendOtpEmail (
46
+ senderEmail: testSenderEmail,
44
47
recipientEmail: testEmail,
45
48
otpCode: testOtpCode,
46
49
templateId: testTemplateId,
@@ -49,6 +52,7 @@ void main() {
49
52
// Assert
50
53
verify (
51
54
() => mockEmailClient.sendTransactionalEmail (
55
+ senderEmail: testSenderEmail,
52
56
recipientEmail: testEmail,
53
57
templateId: testTemplateId,
54
58
templateData: {'otp_code' : testOtpCode},
@@ -63,6 +67,7 @@ void main() {
63
67
const exception = NetworkException ();
64
68
when (
65
69
() => mockEmailClient.sendTransactionalEmail (
70
+ senderEmail: any (named: 'senderEmail' ),
66
71
recipientEmail: any (named: 'recipientEmail' ),
67
72
templateId: any (named: 'templateId' ),
68
73
templateData: any (named: 'templateData' ),
@@ -72,6 +77,7 @@ void main() {
72
77
// Act & Assert
73
78
expect (
74
79
() => emailRepository.sendOtpEmail (
80
+ senderEmail: testSenderEmail,
75
81
recipientEmail: testEmail,
76
82
otpCode: testOtpCode,
77
83
templateId: testTemplateId,
@@ -82,6 +88,7 @@ void main() {
82
88
// Verify the client method was called
83
89
verify (
84
90
() => mockEmailClient.sendTransactionalEmail (
91
+ senderEmail: testSenderEmail,
85
92
recipientEmail: testEmail,
86
93
templateId: testTemplateId,
87
94
templateData: {'otp_code' : testOtpCode},
0 commit comments