Rename DeliveryPlatform send method to 'deliver' to aid readability and avoiding confusion with EmailService.send method
Re-arrange order of mocks and inject mocks Rename argument matcher and captor tests
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@ package com.baeldung.mockito.argumentcaptor;
|
||||
|
||||
public interface DeliveryPlatform {
|
||||
|
||||
void send(Email email);
|
||||
void deliver(Email email);
|
||||
|
||||
String getServiceStatus();
|
||||
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ public class EmailService {
|
||||
}
|
||||
Email email = new Email(to, subject, body);
|
||||
email.setFormat(format);
|
||||
platform.send(email);
|
||||
platform.deliver(email);
|
||||
}
|
||||
|
||||
public ServiceStatus checkServiceStatus() {
|
||||
|
||||
Reference in New Issue
Block a user