@@ -31,9 +31,7 @@ public void setUp() {
3131
3232 @ Test
3333 public void sendSms () throws SmsapiException {
34- SMSSend actionSend = apiFactory .actionSend ()
35- .setText ("test message" )
36- .setTo (numberTest );
34+ SMSSend actionSend = apiFactory .actionSend (numberTest , "test message" );
3735
3836 SendStatusResponse responseAdd = actionSend .execute ();
3937
@@ -44,10 +42,7 @@ public void sendSms() throws SmsapiException {
4442
4543 @ Test
4644 public void getSms () throws SmsapiException {
47- SendStatusResponse responseSend = apiFactory .actionSend ()
48- .setText ("test message" )
49- .setTo (numberTest )
50- .execute ();
45+ SendStatusResponse responseSend = apiFactory .actionSend (numberTest , "test message" ).execute ();
5146
5247 Optional <MessageResponse > sendMessageResponse = responseSend .list .stream ().findFirst ();
5348 assertTrue (sendMessageResponse .isPresent ());
@@ -62,11 +57,9 @@ public void getSms() throws SmsapiException {
6257
6358 @ Test
6459 public void deleteSms () throws SmsapiException {
65- SendStatusResponse responseSend = apiFactory .actionSend ()
66- .setText ("test message" )
67- .setTo (numberTest )
68- .setDateSent ((new Date ().getTime () / 1000 ) + 120 )
69- .execute ();
60+ SendStatusResponse responseSend = apiFactory .actionSend (numberTest , "test message" )
61+ .setDateSent ((new Date ().getTime () / 1000 ) + 120 )
62+ .execute ();
7063
7164 Optional <MessageResponse > sendMessageResponse = responseSend .list .stream ().findFirst ();
7265 assertTrue (sendMessageResponse .isPresent ());
0 commit comments