File tree 1 file changed +16
-0
lines changed
src/test/java/pl/smsapi/api/action/sms/sendernames
1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,22 @@ public void deleteSendername() throws SmsapiException {
66
66
assertNotNull (responseDelete );
67
67
}
68
68
69
+ @ Test
70
+ public void deleteSendernameWithError () throws SmsapiException {
71
+ SendernameDelete actionDelete = apiFactory .actionDelete (SenderMother .createRandomValid ());
72
+ boolean errorCatch = false ;
73
+
74
+ try {
75
+ actionDelete .execute ();
76
+ } catch (SmsapiErrorException badRequest ) {
77
+ assertEquals ("Not found sender" , badRequest .getMessage ());
78
+ assertEquals ("not_found" , badRequest .getError ());
79
+ errorCatch = true ;
80
+ }
81
+
82
+ assertTrue (errorCatch );
83
+ }
84
+
69
85
@ Test
70
86
public void makeDefaultSendername () throws SmsapiException {
71
87
SendernameAdd actionAdd = apiFactory .actionAdd (SenderMother .createRandomValid ());
You can’t perform that action at this time.
0 commit comments