@@ -4159,14 +4159,8 @@ public void test_user_webhooks_parse_stats_get() throws IOException {
4159
4159
4160
4160
@ Test
4161
4161
public void test_whitelabel_domains_post () throws IOException {
4162
- SendGrid sg = null ;
4163
- if (System .getenv ("TRAVIS" ) != null && Boolean .parseBoolean (System .getenv ("TRAVIS" ))) {
4164
- sg = new SendGrid ("SENDGRID_API_KEY" );
4165
- sg .setHost (System .getenv ("MOCK_HOST" ));
4166
- } else {
4167
- sg = new SendGrid ("SENDGRID_API_KEY" , true );
4168
- sg .setHost ("localhost:4010" );
4169
- }
4162
+ SendGrid sg = new SendGrid ("SENDGRID_API_KEY" , true );
4163
+ sg .setHost ("localhost:4010" );
4170
4164
sg .addRequestHeader ("X-Mock" , "201" );
4171
4165
4172
4166
Request request = new Request ();
@@ -4179,14 +4173,8 @@ public void test_whitelabel_domains_post() throws IOException {
4179
4173
4180
4174
@ Test
4181
4175
public void test_whitelabel_domains_get () throws IOException {
4182
- SendGrid sg = null ;
4183
- if (System .getenv ("TRAVIS" ) != null && Boolean .parseBoolean (System .getenv ("TRAVIS" ))) {
4184
- sg = new SendGrid ("SENDGRID_API_KEY" );
4185
- sg .setHost (System .getenv ("MOCK_HOST" ));
4186
- } else {
4187
- sg = new SendGrid ("SENDGRID_API_KEY" , true );
4188
- sg .setHost ("localhost:4010" );
4189
- }
4176
+ SendGrid sg = new SendGrid ("SENDGRID_API_KEY" , true );
4177
+ sg .setHost ("localhost:4010" );
4190
4178
sg .addRequestHeader ("X-Mock" , "200" );
4191
4179
4192
4180
Request request = new Request ();
@@ -4203,14 +4191,8 @@ public void test_whitelabel_domains_get() throws IOException {
4203
4191
4204
4192
@ Test
4205
4193
public void test_whitelabel_domains_default_get () throws IOException {
4206
- SendGrid sg = null ;
4207
- if (System .getenv ("TRAVIS" ) != null && Boolean .parseBoolean (System .getenv ("TRAVIS" ))) {
4208
- sg = new SendGrid ("SENDGRID_API_KEY" );
4209
- sg .setHost (System .getenv ("MOCK_HOST" ));
4210
- } else {
4211
- sg = new SendGrid ("SENDGRID_API_KEY" , true );
4212
- sg .setHost ("localhost:4010" );
4213
- }
4194
+ SendGrid sg = new SendGrid ("SENDGRID_API_KEY" , true );
4195
+ sg .setHost ("localhost:4010" );
4214
4196
sg .addRequestHeader ("X-Mock" , "200" );
4215
4197
4216
4198
Request request = new Request ();
@@ -4222,14 +4204,8 @@ public void test_whitelabel_domains_default_get() throws IOException {
4222
4204
4223
4205
@ Test
4224
4206
public void test_whitelabel_domains_subuser_get () throws IOException {
4225
- SendGrid sg = null ;
4226
- if (System .getenv ("TRAVIS" ) != null && Boolean .parseBoolean (System .getenv ("TRAVIS" ))) {
4227
- sg = new SendGrid ("SENDGRID_API_KEY" );
4228
- sg .setHost (System .getenv ("MOCK_HOST" ));
4229
- } else {
4230
- sg = new SendGrid ("SENDGRID_API_KEY" , true );
4231
- sg .setHost ("localhost:4010" );
4232
- }
4207
+ SendGrid sg = new SendGrid ("SENDGRID_API_KEY" , true );
4208
+ sg .setHost ("localhost:4010" );
4233
4209
sg .addRequestHeader ("X-Mock" , "200" );
4234
4210
4235
4211
Request request = new Request ();
@@ -4241,14 +4217,8 @@ public void test_whitelabel_domains_subuser_get() throws IOException {
4241
4217
4242
4218
@ Test
4243
4219
public void test_whitelabel_domains_subuser_delete () throws IOException {
4244
- SendGrid sg = null ;
4245
- if (System .getenv ("TRAVIS" ) != null && Boolean .parseBoolean (System .getenv ("TRAVIS" ))) {
4246
- sg = new SendGrid ("SENDGRID_API_KEY" );
4247
- sg .setHost (System .getenv ("MOCK_HOST" ));
4248
- } else {
4249
- sg = new SendGrid ("SENDGRID_API_KEY" , true );
4250
- sg .setHost ("localhost:4010" );
4251
- }
4220
+ SendGrid sg = new SendGrid ("SENDGRID_API_KEY" , true );
4221
+ sg .setHost ("localhost:4010" );
4252
4222
sg .addRequestHeader ("X-Mock" , "204" );
4253
4223
4254
4224
Request request = new Request ();
@@ -4260,14 +4230,8 @@ public void test_whitelabel_domains_subuser_delete() throws IOException {
4260
4230
4261
4231
@ Test
4262
4232
public void test_whitelabel_domains__domain_id__patch () throws IOException {
4263
- SendGrid sg = null ;
4264
- if (System .getenv ("TRAVIS" ) != null && Boolean .parseBoolean (System .getenv ("TRAVIS" ))) {
4265
- sg = new SendGrid ("SENDGRID_API_KEY" );
4266
- sg .setHost (System .getenv ("MOCK_HOST" ));
4267
- } else {
4268
- sg = new SendGrid ("SENDGRID_API_KEY" , true );
4269
- sg .setHost ("localhost:4010" );
4270
- }
4233
+ SendGrid sg = new SendGrid ("SENDGRID_API_KEY" , true );
4234
+ sg .setHost ("localhost:4010" );
4271
4235
sg .addRequestHeader ("X-Mock" , "200" );
4272
4236
4273
4237
Request request = new Request ();
@@ -4280,14 +4244,8 @@ public void test_whitelabel_domains__domain_id__patch() throws IOException {
4280
4244
4281
4245
@ Test
4282
4246
public void test_whitelabel_domains__domain_id__get () throws IOException {
4283
- SendGrid sg = null ;
4284
- if (System .getenv ("TRAVIS" ) != null && Boolean .parseBoolean (System .getenv ("TRAVIS" ))) {
4285
- sg = new SendGrid ("SENDGRID_API_KEY" );
4286
- sg .setHost (System .getenv ("MOCK_HOST" ));
4287
- } else {
4288
- sg = new SendGrid ("SENDGRID_API_KEY" , true );
4289
- sg .setHost ("localhost:4010" );
4290
- }
4247
+ SendGrid sg = new SendGrid ("SENDGRID_API_KEY" , true );
4248
+ sg .setHost ("localhost:4010" );
4291
4249
sg .addRequestHeader ("X-Mock" , "200" );
4292
4250
4293
4251
Request request = new Request ();
@@ -4299,14 +4257,8 @@ public void test_whitelabel_domains__domain_id__get() throws IOException {
4299
4257
4300
4258
@ Test
4301
4259
public void test_whitelabel_domains__domain_id__delete () throws IOException {
4302
- SendGrid sg = null ;
4303
- if (System .getenv ("TRAVIS" ) != null && Boolean .parseBoolean (System .getenv ("TRAVIS" ))) {
4304
- sg = new SendGrid ("SENDGRID_API_KEY" );
4305
- sg .setHost (System .getenv ("MOCK_HOST" ));
4306
- } else {
4307
- sg = new SendGrid ("SENDGRID_API_KEY" , true );
4308
- sg .setHost ("localhost:4010" );
4309
- }
4260
+ SendGrid sg = new SendGrid ("SENDGRID_API_KEY" , true );
4261
+ sg .setHost ("localhost:4010" );
4310
4262
sg .addRequestHeader ("X-Mock" , "204" );
4311
4263
4312
4264
Request request = new Request ();
@@ -4318,14 +4270,8 @@ public void test_whitelabel_domains__domain_id__delete() throws IOException {
4318
4270
4319
4271
@ Test
4320
4272
public void test_whitelabel_domains__domain_id__subuser_post () throws IOException {
4321
- SendGrid sg = null ;
4322
- if (System .getenv ("TRAVIS" ) != null && Boolean .parseBoolean (System .getenv ("TRAVIS" ))) {
4323
- sg = new SendGrid ("SENDGRID_API_KEY" );
4324
- sg .setHost (System .getenv ("MOCK_HOST" ));
4325
- } else {
4326
- sg = new SendGrid ("SENDGRID_API_KEY" , true );
4327
- sg .setHost ("localhost:4010" );
4328
- }
4273
+ SendGrid sg = new SendGrid ("SENDGRID_API_KEY" , true );
4274
+ sg .setHost ("localhost:4010" );
4329
4275
sg .addRequestHeader ("X-Mock" , "201" );
4330
4276
4331
4277
Request request = new Request ();
@@ -4338,14 +4284,8 @@ public void test_whitelabel_domains__domain_id__subuser_post() throws IOExceptio
4338
4284
4339
4285
@ Test
4340
4286
public void test_whitelabel_domains__id__ips_post () throws IOException {
4341
- SendGrid sg = null ;
4342
- if (System .getenv ("TRAVIS" ) != null && Boolean .parseBoolean (System .getenv ("TRAVIS" ))) {
4343
- sg = new SendGrid ("SENDGRID_API_KEY" );
4344
- sg .setHost (System .getenv ("MOCK_HOST" ));
4345
- } else {
4346
- sg = new SendGrid ("SENDGRID_API_KEY" , true );
4347
- sg .setHost ("localhost:4010" );
4348
- }
4287
+ SendGrid sg = new SendGrid ("SENDGRID_API_KEY" , true );
4288
+ sg .setHost ("localhost:4010" );
4349
4289
sg .addRequestHeader ("X-Mock" , "200" );
4350
4290
4351
4291
Request request = new Request ();
0 commit comments