16
16
import org .hamcrest .CoreMatchers ;
17
17
import org .junit .Assume ;
18
18
import org .junit .Before ;
19
+ import org .junit .Ignore ;
19
20
import org .junit .Test ;
20
21
21
22
import java .util .ArrayList ;
@@ -38,7 +39,7 @@ public class ClusterTest {
38
39
String clientSecret ;
39
40
String messageSid ;
40
41
TwilioRestClient customRestClient ;
41
-
42
+
42
43
String accountSid ;
43
44
44
45
@ Before
@@ -57,11 +58,11 @@ public void setUp() {
57
58
orgsClientSecret = System .getenv ("TWILIO_ORGS_CLIENT_SECRET" );
58
59
organisationSid = System .getenv ("TWILIO_ORG_SID" );
59
60
TwilioOrgsTokenAuth .init (grantType , orgsClientId , orgsClientSecret );
60
-
61
+
61
62
clientId = System .getenv ("TWILIO_CLIENT_ID" );
62
63
clientSecret = System .getenv ("TWILIO_CLIENT_SECRET" );
63
64
messageSid = System .getenv ("TWILIO_MESSAGE_SID" );
64
-
65
+
65
66
// CustomHttpClient
66
67
customRestClient = new TwilioRestClient .Builder (apiKey , secret ).accountSid (accountSid ).httpClient (new CustomHttpClient ()).build ();
67
68
}
@@ -138,23 +139,23 @@ public void testListParams() {
138
139
}
139
140
140
141
@ Test
142
+ @ Ignore
141
143
public void testOrgsApi (){
142
-
143
- //Fetching the account information
144
- ResourceSet <Account > accountSet = Account .reader (organisationSid ).read ();
145
- String accountSid = accountSet .iterator ().next ().getAccountSid ();
146
- assertNotNull (accountSid );
147
-
148
- //Fetching specific account
149
- Account account = Account .fetcher (organisationSid , accountSid ).fetch ();
150
- assertNotNull (account .getAccountSid ());
151
-
152
- //Fetching users of this organisation
153
- ResourceSet <com .twilio .rest .previewiam .organizations .User >
154
- userSet = com .twilio .rest .previewiam .organizations .User .reader (organisationSid ).read ();
155
- assertNotNull (userSet );
156
- String userId = userSet .iterator ().next ().getId ().toString ();
157
- assertNotNull (userId );
144
+ //Fetching the account information
145
+ ResourceSet <Account > accountSet = Account .reader (organisationSid ).read ();
146
+ String accountSid = accountSet .iterator ().next ().getAccountSid ();
147
+ assertNotNull (accountSid );
148
+
149
+ //Fetching specific account
150
+ Account account = Account .fetcher (organisationSid , accountSid ).fetch ();
151
+ assertNotNull (account .getAccountSid ());
152
+
153
+ //Fetching users of this organisation
154
+ ResourceSet <com .twilio .rest .previewiam .organizations .User >
155
+ userSet = com .twilio .rest .previewiam .organizations .User .reader (organisationSid ).read ();
156
+ assertNotNull (userSet );
157
+ String userId = userSet .iterator ().next ().getId ().toString ();
158
+ assertNotNull (userId );
158
159
}
159
160
160
161
// Test multipart/form-data
@@ -175,7 +176,7 @@ public void testMultiPartFormData() {
175
176
// @Test
176
177
// public void testPublicOAuthFetchMessage() {
177
178
// Twilio.init(new ClientCredentialProvider(clientId, clientSecret), accountSid);
178
- // // Fetching an existing message; if this test fails, the SID might be deleted,
179
+ // // Fetching an existing message; if this test fails, the SID might be deleted,
179
180
// // in that case, change TWILIO_MESSAGE_SID in twilio-java repo env variables
180
181
// Message message = Message.fetcher(messageSid).fetch();
181
182
// assertNotNull(message);
0 commit comments