File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
src/test/java/pl/smsapi/api/action/sms/sendernames Expand file tree Collapse file tree 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 {
6666 assertNotNull (responseDelete );
6767 }
6868
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+
6985 @ Test
7086 public void makeDefaultSendername () throws SmsapiException {
7187 SendernameAdd actionAdd = apiFactory .actionAdd (SenderMother .createRandomValid ());
You can’t perform that action at this time.
0 commit comments