File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed
saas-modules/twilio-whatsapp/src
main/java/com/baeldung/twilio/whatsapp
test/java/com/baeldung/twilio/whatsapp Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1111@ RequiredArgsConstructor
1212public class ReplyController {
1313
14- private final WhatsappMessageDispatcher whatsappMessageDispatcher ;
14+ private final WhatsAppMessageDispatcher whatsAppMessageDispatcher ;
1515
1616 @ PostMapping (value = "/api/v1/whatsapp-message-reply" )
1717 public ResponseEntity <Void > reply (@ RequestParam ("ProfileName" ) String username ,
1818 @ RequestParam ("WaId" ) String phoneNumber ) {
19- whatsappMessageDispatcher .dispatchReplyMessage (phoneNumber , username );
19+ whatsAppMessageDispatcher .dispatchReplyMessage (phoneNumber , username );
2020 return ResponseEntity .ok ().build ();
2121 }
2222
Original file line number Diff line number Diff line change 1212@ Service
1313@ RequiredArgsConstructor
1414@ EnableConfigurationProperties (TwilioConfigurationProperties .class )
15- public class WhatsappMessageDispatcher {
15+ public class WhatsAppMessageDispatcher {
1616
1717 private final TwilioConfigurationProperties twilioConfigurationProperties ;
1818
Original file line number Diff line number Diff line change 2525@ MockServerTest
2626@ ActiveProfiles ("integration-test" )
2727@ EnableConfigurationProperties (TwilioConfigurationProperties .class )
28- class WhatsappMessageDispatcherIntegrationTest {
28+ class WhatsAppMessageDispatcherIntegrationTest {
2929
3030 private MockServerClient mockServerClient ;
3131
3232 @ Autowired
33- private WhatsappMessageDispatcher whatsappMessageDispatcher ;
33+ private WhatsAppMessageDispatcher whatsAppMessageDispatcher ;
3434
3535 @ Autowired
3636 private TwilioConfigurationProperties twilioConfigurationProperties ;
@@ -77,7 +77,7 @@ void whenNewArticleNotificationDispatched_thenTwilioApiCalledWithCorrectParamete
7777 .withBody (EMPTY_JSON ));
7878
7979 // Invoke method under test
80- whatsappMessageDispatcher .dispatchNewArticleNotification (contactNumber , RandomString .make ());
80+ whatsAppMessageDispatcher .dispatchNewArticleNotification (contactNumber , RandomString .make ());
8181
8282 // Verify the expected request was made
8383 mockServerClient .verify (request ()
@@ -116,7 +116,7 @@ void whenReplyMessageDispatched_thenTwilioApiCalledWithCorrectParameters() {
116116 .withBody (EMPTY_JSON ));
117117
118118 // Invoke method under test
119- whatsappMessageDispatcher .dispatchReplyMessage (contactNumber , username );
119+ whatsAppMessageDispatcher .dispatchReplyMessage (contactNumber , username );
120120
121121 // Verify the expected request was made
122122 mockServerClient .verify (request ()
You can’t perform that action at this time.
0 commit comments