@@ -77,7 +77,7 @@ function testSendTextMessage() {
7777 //---Set Attachments---
7878 AttachmentPath [] attachments = [{attachmentPath : testAttachmentPath , mimeType : attachmentContentType }];
7979 messageRequest .attachmentPaths = attachments ;
80- log : printInfo (" testSendTextMessage" );
80+ log : print (" testSendTextMessage" );
8181 //----Send the mail----
8282 var sendMessageResponse = gmailClient -> sendMessage (testUserId , messageRequest );
8383
@@ -110,7 +110,7 @@ function testSendHTMLMessage() {
110110 //---Set Attachments---
111111 AttachmentPath [] attachments = [{attachmentPath : testAttachmentPath , mimeType : attachmentContentType }];
112112 messageRequest .attachmentPaths = attachments ;
113- log : printInfo (" testSendHTMLMessage" );
113+ log : print (" testSendHTMLMessage" );
114114 //----Send the mail----
115115 var sendMessageResponse = gmailClient -> sendMessage (testUserId , messageRequest );
116116 string messageId = " " ;
@@ -130,7 +130,7 @@ function testSendHTMLMessage() {
130130}
131131function testModifyHTMLMessage() {
132132 //Modify labels of the message with message id which was sent in testSendHTMLMessage
133- log : printInfo (" testModifyHTMLMessage" );
133+ log : print (" testModifyHTMLMessage" );
134134 var response = gmailClient -> modifyMessage (testUserId , sentHtmlMessageId , [" INBOX" ], []);
135135 if (response is Message ) {
136136 test : assertTrue (response .id == sentHtmlMessageId , msg = " Modify HTML message by adding new label failed" );
@@ -151,7 +151,7 @@ function testModifyHTMLMessage() {
151151}
152152function testListMessages() {
153153 //List All Messages with Label INBOX without including Spam and Trash
154- log : printInfo (" testListAllMessages" );
154+ log : print (" testListAllMessages" );
155155 MsgSearchFilter searchFilter = {includeSpamTrash : false , labelIds : [" INBOX" ]};
156156 var msgList = gmailClient -> listMessages (" me" , filter = searchFilter );
157157 if msgList is error {
@@ -165,7 +165,7 @@ function testListMessages() {
165165}
166166function testReadTextMessage() {
167167 //Read mail with message id which was sent in testSendSimpleMessage
168- log : printInfo (" testReadTextMessage" );
168+ log : print (" testReadTextMessage" );
169169 var response = gmailClient -> readMessage (testUserId , sentTextMessageId );
170170 if (response is Message ) {
171171 testHistoryId = < @untainted > response .historyId ;
@@ -181,7 +181,7 @@ function testReadTextMessage() {
181181}
182182function testReadHTMLMessageWithAttachment() {
183183 //Read mail with message id which sent in testSendWithAttachment
184- log : printInfo (" testReadMessageWithAttachment" );
184+ log : print (" testReadMessageWithAttachment" );
185185 var response = gmailClient -> readMessage (testUserId , sentHtmlMessageId );
186186 if (response is Message ) {
187187 readAttachmentFileId = < @untainted > response .msgAttachments [0 ].fileId ;
@@ -196,7 +196,7 @@ function testReadHTMLMessageWithAttachment() {
196196 groups : [" htmlMessageTestGroup" ]
197197}
198198function testgetAttachment() {
199- log : printInfo (" testgetAttachment" );
199+ log : print (" testgetAttachment" );
200200 var response = gmailClient -> getAttachment (testUserId , sentHtmlMessageId , readAttachmentFileId );
201201 if (response is error ) {
202202 test : assertFail (msg = response .message ());
@@ -211,7 +211,7 @@ function testgetAttachment() {
211211 groups : [" htmlMessageTestGroup" ]
212212}
213213function testTrashMessage() {
214- log : printInfo (" testTrashMessage" );
214+ log : print (" testTrashMessage" );
215215 var trash = gmailClient -> trashMessage (testUserId , sentHtmlMessageId );
216216 if (trash is error ) {
217217 test : assertFail (msg = trash .message ());
@@ -225,7 +225,7 @@ function testTrashMessage() {
225225 groups : [" htmlMessageTestGroup" ]
226226}
227227function testUntrashMessage() {
228- log : printInfo (" testUntrashMessage" );
228+ log : print (" testUntrashMessage" );
229229 var untrash = gmailClient -> untrashMessage (testUserId , sentHtmlMessageId );
230230 if (untrash is error ) {
231231 test : assertFail (msg = untrash .message ());
@@ -239,7 +239,7 @@ function testUntrashMessage() {
239239 groups : [" htmlMessageTestGroup" ]
240240}
241241function testDeleteMessage() {
242- log : printInfo (" testDeleteMessage" );
242+ log : print (" testDeleteMessage" );
243243 var delete = gmailClient -> deleteMessage (testUserId , sentHtmlMessageId );
244244 if (delete is error ) {
245245 test : assertFail (msg = delete .message ());
@@ -252,7 +252,7 @@ function testDeleteMessage() {
252252
253253}
254254function testListThreads() {
255- log : printInfo (" testListThreads" );
255+ log : print (" testListThreads" );
256256 var threadList = gmailClient -> listThreads (testUserId , filter = {includeSpamTrash : false , labelIds : [" INBOX" ]});
257257 if (threadList is error ) {
258258 test : assertFail (msg = threadList .message ());
@@ -264,7 +264,7 @@ function testListThreads() {
264264 groups : [" textMessageTestGroup" ]
265265}
266266function testReadThread() {
267- log : printInfo (" testReadThread" );
267+ log : print (" testReadThread" );
268268 var thread = gmailClient -> readThread (testUserId , sentTextMessageThreadId , format = FORMAT_METADATA ,
269269 metadataHeaders = [" Subject" ]);
270270 if (thread is MailThread ) {
@@ -280,7 +280,7 @@ function testReadThread() {
280280}
281281function testModifyThread() {
282282 //Modify labels of the thread with thread id which was sent in testSendTextMessage
283- log : printInfo (" testModifyThread" );
283+ log : print (" testModifyThread" );
284284 var response = gmailClient -> modifyThread (testUserId , sentTextMessageThreadId , [" INBOX" ], []);
285285 if (response is MailThread ) {
286286 test : assertTrue (response .id == sentTextMessageThreadId , msg = " Modify thread by adding new label failed" );
@@ -301,7 +301,7 @@ function testModifyThread() {
301301 groups : [" textMessageTestGroup" ]
302302}
303303function testTrashThread() {
304- log : printInfo (" testTrashThread" );
304+ log : print (" testTrashThread" );
305305 var trash = gmailClient -> trashThread (testUserId , sentTextMessageThreadId );
306306 if (trash is error ) {
307307 test : assertFail (msg = trash .message ());
@@ -315,7 +315,7 @@ function testTrashThread() {
315315 groups : [" textMessageTestGroup" ]
316316}
317317function testUnTrashThread() {
318- log : printInfo (" testUnTrashThread" );
318+ log : print (" testUnTrashThread" );
319319 var untrash = gmailClient -> untrashThread (testUserId , sentTextMessageThreadId );
320320 if (untrash is error ) {
321321 test : assertFail (msg = untrash .message ());
@@ -330,7 +330,7 @@ function testUnTrashThread() {
330330 groups : [" textMessageTestGroup" ]
331331}
332332function testDeleteThread() {
333- log : printInfo (" testDeleteThread" );
333+ log : print (" testDeleteThread" );
334334 var delete = gmailClient -> deleteThread (testUserId , sentTextMessageThreadId );
335335 if (delete is error ) {
336336 test : assertFail (msg = delete .message ());
@@ -343,7 +343,7 @@ function testDeleteThread() {
343343 groups : [" userTestGroup" ]
344344}
345345function testgetUserProfile() {
346- log : printInfo (" testgetUserProfile" );
346+ log : print (" testgetUserProfile" );
347347 var profile = gmailClient -> getUserProfile (testUserId );
348348 if (profile is UserProfile ) {
349349 test : assertTrue (profile .emailAddress != EMPTY_STRING , msg = " Get User Profile failed" );
@@ -356,7 +356,7 @@ function testgetUserProfile() {
356356 groups : [" labelTestGroup" ]
357357}
358358function testGetLabel() {
359- log : printInfo (" testgetLabel" );
359+ log : print (" testgetLabel" );
360360 var response = gmailClient -> getLabel (testUserId , createdLabelId );
361361 if (response is Label ) {
362362 test : assertTrue (response .id != EMPTY_STRING , msg = " Get Label failed" );
@@ -369,7 +369,7 @@ function testGetLabel() {
369369 groups : [" labelTestGroup" ]
370370}
371371function testCreateLabel() {
372- log : printInfo (" testCreateLabel" );
372+ log : print (" testCreateLabel" );
373373 var createLabelResponse = gmailClient -> createLabel (testUserId , " Test" , " labelShow" , " show" );
374374 if (createLabelResponse is string ) {
375375 createdLabelId = < @untainted > createLabelResponse ;
@@ -383,7 +383,7 @@ function testCreateLabel() {
383383 groups : [" labelTestGroup" ]
384384}
385385function testListLabels() {
386- log : printInfo (" testListLabels" );
386+ log : print (" testListLabels" );
387387 var listLabelResponse = gmailClient -> listLabels (testUserId );
388388 if (listLabelResponse is error ) {
389389 test : assertFail (msg = listLabelResponse .message ());
@@ -395,7 +395,7 @@ function testListLabels() {
395395 groups : [" labelTestGroup" ]
396396}
397397function testDeleteLabel() {
398- log : printInfo (" testDeleteLabel" );
398+ log : print (" testDeleteLabel" );
399399 var deleteLabelResponse = gmailClient -> deleteLabel (testUserId , createdLabelId );
400400 if (deleteLabelResponse is error ) {
401401 test : assertFail (msg = deleteLabelResponse .message ());
@@ -409,7 +409,7 @@ function testDeleteLabel() {
409409 groups : [" labelTestGroup" ]
410410}
411411function testUpdateLabel() {
412- log : printInfo (" testUpdateLabel" );
412+ log : print (" testUpdateLabel" );
413413 string updateName = " updateTest" ;
414414 string updateBgColor = " #16a766" ;
415415 string updateTxtColor = " #000000" ;
@@ -429,7 +429,7 @@ function testUpdateLabel() {
429429 groups : [" textMessageTestGroup" ]
430430}
431431function testListHistory() {
432- log : printInfo (" testListTheHistory" );
432+ log : print (" testListTheHistory" );
433433 string [] historyTypes = [" labelAdded" , " labelRemoved" , " messageAdded" , " messageDeleted" ];
434434 var listHistoryResponse = gmailClient -> listHistory (testUserId , testHistoryId , historyTypes = historyTypes );
435435 if (listHistoryResponse is error ) {
@@ -444,7 +444,7 @@ function testListHistory() {
444444}
445445function testListDrafts() {
446446 //List maximum of ten results for Drafts without including Spam and Trash
447- log : printInfo (" testListDrafts" );
447+ log : print (" testListDrafts" );
448448 DraftSearchFilter searchFilter = {includeSpamTrash : false , maxResults : " 10" };
449449 var msgList = gmailClient -> listDrafts (" me" , filter = searchFilter );
450450 if (msgList is error ) {
@@ -457,7 +457,7 @@ function testListDrafts() {
457457 groups : [" draftTestGroup" ]
458458}
459459function testCreateDraft() {
460- log : printInfo (" testCreateDraft" );
460+ log : print (" testCreateDraft" );
461461 string messageBody = " Draft Text Message Body" ;
462462 MessageRequest messageRequest = {};
463463 messageRequest .recipient = testRecipient ;
@@ -479,7 +479,7 @@ function testCreateDraft() {
479479 groups : [" draftTestGroup" ]
480480}
481481function testUpdateDraft() {
482- log : printInfo (" testUpdateDraft" );
482+ log : print (" testUpdateDraft" );
483483 string messageBody = " Updated Draft Text Message Body" ;
484484 MessageRequest messageRequest = {};
485485 messageRequest .recipient = testRecipient ;
@@ -502,7 +502,7 @@ function testUpdateDraft() {
502502 groups : [" draftTestGroup" ]
503503}
504504function testReadDraft() {
505- log : printInfo (" testReadDraft" );
505+ log : print (" testReadDraft" );
506506 var draftResponse = gmailClient -> readDraft (testUserId , createdDraftId );
507507 if (draftResponse is Draft ) {
508508 test : assertTrue (draftResponse .id == createdDraftId , msg = " Read Draft failed" );
@@ -516,7 +516,7 @@ function testReadDraft() {
516516 groups : [" draftTestGroup" ]
517517}
518518function testSendDraft() {
519- log : printInfo (" testSendDraft" );
519+ log : print (" testSendDraft" );
520520 var sendDraftResponse = gmailClient -> sendDraft (testUserId , createdDraftId );
521521 if (sendDraftResponse is error ) {
522522 test : assertFail (msg = sendDraftResponse .message ());
@@ -530,7 +530,7 @@ function testSendDraft() {
530530 groups : [" draftTestGroup" ]
531531}
532532function testDeleteDraft() {
533- log : printInfo (" testDeleteDraft" );
533+ log : print (" testDeleteDraft" );
534534 //Create a new draft first
535535 MessageRequest messageRequest = {};
536536 messageRequest .recipient = testRecipient ;
0 commit comments