@@ -23,28 +23,32 @@ class SendingDomainsImplTest extends BaseTest {
2323 @ BeforeEach
2424 public void init () {
2525 TestHttpClient httpClient = new TestHttpClient (List .of (
26- DataMock .build (
27- Constants .GENERAL_HOST + "/api/accounts/" + accountId + "/sending_domains" ,
28- "POST" , "api/sending_domains/createSendingDomainRequest.json" , "api/sending_domains/sendingDomainResponse.json"
29- ),
30- DataMock .build (
31- Constants .GENERAL_HOST + "/api/accounts/" + accountId + "/sending_domains" ,
32- "GET" , null , "api/sending_domains/sendingDomainsResponse.json"
33- ),
34- DataMock .build (
35- Constants .GENERAL_HOST + "/api/accounts/" + accountId + "/sending_domains/" + sendingDomainId ,
36- "GET" , null , "api/sending_domains/sendingDomainResponse.json"
37- ),
38- DataMock .build (
39- Constants .GENERAL_HOST + "/api/accounts/" + accountId + "/sending_domains/" + sendingDomainId + "/send_setup_instructions" ,
40- "POST" , "api/sending_domains/sendSetupInstructionsRequest.json" , null
41- )
26+ DataMock .build (
27+ Constants .GENERAL_HOST + "/api/accounts/" + accountId + "/sending_domains" ,
28+ "POST" , "api/sending_domains/createSendingDomainRequest.json" , "api/sending_domains/sendingDomainResponse.json"
29+ ),
30+ DataMock .build (
31+ Constants .GENERAL_HOST + "/api/accounts/" + accountId + "/sending_domains" ,
32+ "GET" , null , "api/sending_domains/sendingDomainsResponse.json"
33+ ),
34+ DataMock .build (
35+ Constants .GENERAL_HOST + "/api/accounts/" + accountId + "/sending_domains/" + sendingDomainId ,
36+ "GET" , null , "api/sending_domains/sendingDomainResponse.json"
37+ ),
38+ DataMock .build (
39+ Constants .GENERAL_HOST + "/api/accounts/" + accountId + "/sending_domains/" + sendingDomainId + "/send_setup_instructions" ,
40+ "POST" , "api/sending_domains/sendSetupInstructionsRequest.json" , null
41+ ),
42+ DataMock .build (
43+ Constants .GENERAL_HOST + "/api/accounts/" + accountId + "/sending_domains/" + sendingDomainId ,
44+ "DELETE" , null , null
45+ )
4246 ));
4347
4448 MailtrapConfig testConfig = new MailtrapConfig .Builder ()
45- .httpClient (httpClient )
46- .token ("dummy_token" )
47- .build ();
49+ .httpClient (httpClient )
50+ .token ("dummy_token" )
51+ .build ();
4852
4953 domains = MailtrapClientFactory .createMailtrapClient (testConfig ).sendingApi ().domains ();
5054 }
@@ -82,4 +86,9 @@ void test_getSendingDomain() {
8286 void test_sendSendingDomainsSetupInstructions () {
8387 domains .
sendSendingDomainsSetupInstructions (
accountId ,
sendingDomainId ,
new SendingDomainsSetupInstructionsRequest (
"[email protected] " ));
8488 }
89+
90+ @ Test
91+ void test_deleteSendingDomain () {
92+ assertDoesNotThrow (() -> domains .deleteSendingDomain (accountId , sendingDomainId ));
93+ }
8594}
0 commit comments