Skip to content

Commit 7e8fbd2

Browse files
committed
Test files update
1 parent 3265086 commit 7e8fbd2

11 files changed

+128
-91
lines changed

src/test/java/sibApi/AccountApiTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class AccountApiTest {
3838

3939

4040
/**
41-
* Get your account informations, plans and credits details
41+
* Get your account information, plan and credits details
4242
*
4343
*
4444
*

src/test/java/sibApi/AttributesApiTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class AttributesApiTest {
3636

3737

3838
/**
39-
* Creates contact attribute
39+
* Create contact attribute
4040
*
4141
*
4242
*
@@ -54,7 +54,7 @@ public void createAttributeTest() throws ApiException {
5454
}
5555

5656
/**
57-
* Deletes an attribute
57+
* Delete an attribute
5858
*
5959
*
6060
*
@@ -71,7 +71,7 @@ public void deleteAttributeTest() throws ApiException {
7171
}
7272

7373
/**
74-
* Lists all attributes
74+
* List all attributes
7575
*
7676
*
7777
*
@@ -86,7 +86,7 @@ public void getAttributesTest() throws ApiException {
8686
}
8787

8888
/**
89-
* Updates contact attribute
89+
* Update contact attribute
9090
*
9191
*
9292
*

src/test/java/sibApi/ContactsApiTest.java

Lines changed: 36 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import sibModel.AddContactToList;
1818
import sibModel.CreateAttribute;
1919
import sibModel.CreateContact;
20+
import sibModel.CreateDoiContact;
2021
import sibModel.CreateList;
2122
import sibModel.CreateModel;
2223
import sibModel.CreateUpdateContactModel;
@@ -32,6 +33,7 @@
3233
import sibModel.GetFolderLists;
3334
import sibModel.GetFolders;
3435
import sibModel.GetLists;
36+
import org.threeten.bp.LocalDate;
3537
import org.threeten.bp.OffsetDateTime;
3638
import sibModel.PostContactInfo;
3739
import sibModel.RemoveContactFromList;
@@ -75,7 +77,7 @@ public void addContactToListTest() throws ApiException {
7577
}
7678

7779
/**
78-
* Creates contact attribute
80+
* Create contact attribute
7981
*
8082
*
8183
*
@@ -108,6 +110,22 @@ public void createContactTest() throws ApiException {
108110
// TODO: test validations
109111
}
110112

113+
/**
114+
* Create Contact via DOI (Double-Opt-In) Flow
115+
*
116+
*
117+
*
118+
* @throws ApiException
119+
* if the Api call fails
120+
*/
121+
@Test
122+
public void createDoiContactTest() throws ApiException {
123+
CreateDoiContact createDoiContact = null;
124+
api.createDoiContact(createDoiContact);
125+
126+
// TODO: test validations
127+
}
128+
111129
/**
112130
* Create a folder
113131
*
@@ -141,7 +159,7 @@ public void createListTest() throws ApiException {
141159
}
142160

143161
/**
144-
* Deletes an attribute
162+
* Delete an attribute
145163
*
146164
*
147165
*
@@ -158,7 +176,7 @@ public void deleteAttributeTest() throws ApiException {
158176
}
159177

160178
/**
161-
* Deletes a contact
179+
* Delete a contact
162180
*
163181
*
164182
*
@@ -206,7 +224,7 @@ public void deleteListTest() throws ApiException {
206224
}
207225

208226
/**
209-
* Lists all attributes
227+
* List all attributes
210228
*
211229
*
212230
*
@@ -221,7 +239,7 @@ public void getAttributesTest() throws ApiException {
221239
}
222240

223241
/**
224-
* Retrieves contact informations
242+
* Get a contact's details
225243
*
226244
*
227245
*
@@ -237,7 +255,7 @@ public void getContactInfoTest() throws ApiException {
237255
}
238256

239257
/**
240-
* Get the campaigns statistics for a contact
258+
* Get email campaigns' statistics for a contact
241259
*
242260
*
243261
*
@@ -247,7 +265,9 @@ public void getContactInfoTest() throws ApiException {
247265
@Test
248266
public void getContactStatsTest() throws ApiException {
249267
String email = null;
250-
GetContactCampaignStats response = api.getContactStats(email);
268+
LocalDate startDate = null;
269+
LocalDate endDate = null;
270+
GetContactCampaignStats response = api.getContactStats(email, startDate, endDate);
251271

252272
// TODO: test validations
253273
}
@@ -271,7 +291,7 @@ public void getContactsTest() throws ApiException {
271291
}
272292

273293
/**
274-
* Get the contacts in a list
294+
* Get contacts in a list
275295
*
276296
*
277297
*
@@ -290,7 +310,7 @@ public void getContactsFromListTest() throws ApiException {
290310
}
291311

292312
/**
293-
* Returns folder details
313+
* Returns a folder's details
294314
*
295315
*
296316
*
@@ -306,7 +326,7 @@ public void getFolderTest() throws ApiException {
306326
}
307327

308328
/**
309-
* Get the lists in a folder
329+
* Get lists in a folder
310330
*
311331
*
312332
*
@@ -324,7 +344,7 @@ public void getFolderListsTest() throws ApiException {
324344
}
325345

326346
/**
327-
* Get all the folders
347+
* Get all folders
328348
*
329349
*
330350
*
@@ -341,7 +361,7 @@ public void getFoldersTest() throws ApiException {
341361
}
342362

343363
/**
344-
* Get the details of a list
364+
* Get a list's details
345365
*
346366
*
347367
*
@@ -390,7 +410,7 @@ public void importContactsTest() throws ApiException {
390410
}
391411

392412
/**
393-
* Remove existing contacts from a list
413+
* Delete a contact from a list
394414
*
395415
*
396416
*
@@ -423,7 +443,7 @@ public void requestContactExportTest() throws ApiException {
423443
}
424444

425445
/**
426-
* Updates contact attribute
446+
* Update contact attribute
427447
*
428448
*
429449
*
@@ -441,7 +461,7 @@ public void updateAttributeTest() throws ApiException {
441461
}
442462

443463
/**
444-
* Updates a contact
464+
* Update a contact
445465
*
446466
*
447467
*
@@ -458,7 +478,7 @@ public void updateContactTest() throws ApiException {
458478
}
459479

460480
/**
461-
* Update a contact folder
481+
* Update a folder
462482
*
463483
*
464484
*

src/test/java/sibApi/EmailCampaignsApiTest.java

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import sibModel.SendTestEmail;
3030
import sibModel.UpdateCampaignStatus;
3131
import sibModel.UpdateEmailCampaign;
32+
import sibModel.UploadImageToGallery;
3233
import org.junit.Test;
3334
import org.junit.Ignore;
3435

@@ -79,7 +80,7 @@ public void deleteEmailCampaignTest() throws ApiException {
7980
}
8081

8182
/**
82-
* Export the recipients of a campaign
83+
* Export the recipients of an email campaign
8384
*
8485
*
8586
*
@@ -96,7 +97,7 @@ public void emailExportRecipientsTest() throws ApiException {
9697
}
9798

9899
/**
99-
* Get A/B test email campaign result
100+
* Get an A/B test email campaign results
100101
*
101102
* Obtain winning version of an A/B test email campaign
102103
*
@@ -112,7 +113,7 @@ public void getAbTestCampaignResultTest() throws ApiException {
112113
}
113114

114115
/**
115-
* Get campaign informations
116+
* Get an email campaign report
116117
*
117118
*
118119
*
@@ -128,7 +129,7 @@ public void getEmailCampaignTest() throws ApiException {
128129
}
129130

130131
/**
131-
* Return all your created campaigns
132+
* Return all your created email campaigns
132133
*
133134
*
134135
*
@@ -181,7 +182,7 @@ public void sendEmailCampaignNowTest() throws ApiException {
181182
}
182183

183184
/**
184-
* Send the report of a campaigns
185+
* Send the report of a campaign
185186
*
186187
* A PDF will be sent to the specified email addresses
187188
*
@@ -215,7 +216,7 @@ public void sendTestEmailTest() throws ApiException {
215216
}
216217

217218
/**
218-
* Update a campaign status
219+
* Update an email campaign status
219220
*
220221
*
221222
*
@@ -232,7 +233,7 @@ public void updateCampaignStatusTest() throws ApiException {
232233
}
233234

234235
/**
235-
* Update a campaign
236+
* Update an email campaign
236237
*
237238
*
238239
*
@@ -248,4 +249,20 @@ public void updateEmailCampaignTest() throws ApiException {
248249
// TODO: test validations
249250
}
250251

252+
/**
253+
* Upload an image to your account's image gallery
254+
*
255+
*
256+
*
257+
* @throws ApiException
258+
* if the Api call fails
259+
*/
260+
@Test
261+
public void uploadImageToGalleryTest() throws ApiException {
262+
UploadImageToGallery uploadImage = null;
263+
api.uploadImageToGallery(uploadImage);
264+
265+
// TODO: test validations
266+
}
267+
251268
}

src/test/java/sibApi/FoldersApiTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void deleteFolderTest() throws ApiException {
7070
}
7171

7272
/**
73-
* Returns folder details
73+
* Returns a folder's details
7474
*
7575
*
7676
*
@@ -86,7 +86,7 @@ public void getFolderTest() throws ApiException {
8686
}
8787

8888
/**
89-
* Get the lists in a folder
89+
* Get lists in a folder
9090
*
9191
*
9292
*
@@ -104,7 +104,7 @@ public void getFolderListsTest() throws ApiException {
104104
}
105105

106106
/**
107-
* Get all the folders
107+
* Get all folders
108108
*
109109
*
110110
*
@@ -121,7 +121,7 @@ public void getFoldersTest() throws ApiException {
121121
}
122122

123123
/**
124-
* Update a contact folder
124+
* Update a folder
125125
*
126126
*
127127
*

src/test/java/sibApi/ListsApiTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public void deleteListTest() throws ApiException {
9393
}
9494

9595
/**
96-
* Get the contacts in a list
96+
* Get contacts in a list
9797
*
9898
*
9999
*
@@ -112,7 +112,7 @@ public void getContactsFromListTest() throws ApiException {
112112
}
113113

114114
/**
115-
* Get the lists in a folder
115+
* Get lists in a folder
116116
*
117117
*
118118
*
@@ -130,7 +130,7 @@ public void getFolderListsTest() throws ApiException {
130130
}
131131

132132
/**
133-
* Get the details of a list
133+
* Get a list's details
134134
*
135135
*
136136
*
@@ -163,7 +163,7 @@ public void getListsTest() throws ApiException {
163163
}
164164

165165
/**
166-
* Remove existing contacts from a list
166+
* Delete a contact from a list
167167
*
168168
*
169169
*

0 commit comments

Comments
 (0)