diff --git a/BUILDNUM b/BUILDNUM index 7f20734..e4c0d46 100644 --- a/BUILDNUM +++ b/BUILDNUM @@ -1 +1 @@ -1.0.1 \ No newline at end of file +1.0.3 \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 915d2b7..e512966 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 1.0.0.{build} +version: 1.0.3.{build} image: Visual Studio 2017 diff --git a/build.gradle b/build.gradle index 48e22be..3ec7f24 100644 --- a/build.gradle +++ b/build.gradle @@ -32,13 +32,13 @@ repositories { } dependencies { - compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version:'2.9.6' + compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version:'2.9.9' compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version:'2.9.6' compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version:'2.9.6' compile group: 'org.apache.httpcomponents', name: 'httpclient', version:'4.5.5' compile group: 'org.apache.httpcomponents', name: 'httpcore', version:'4.4.9' compile group: 'commons-io', name: 'commons-io', version:'2.6' - compile group: 'org.apache.tika', name: 'tika-core', version:'1.19.1' + compile group: 'org.apache.tika', name: 'tika-core', version:'1.20' testCompile group: 'junit', name: 'junit', version:'4.12' } diff --git a/src/main/java/com/datamotion/DMWeb.java b/src/main/java/com/datamotion/DMWeb.java index f2e8f39..8e2f574 100644 --- a/src/main/java/com/datamotion/DMWeb.java +++ b/src/main/java/com/datamotion/DMWeb.java @@ -21,6 +21,9 @@ import com.datamotion.Models.DeleteMessageResponse; import com.datamotion.Models.Details; import com.datamotion.Models.Folders; +import com.datamotion.Models.GetAttachmentResponse; +import com.datamotion.Models.GetMessageSummariesWithMetadata; +import com.datamotion.Models.GetMessageSummariesWithMetadataResponse; import com.datamotion.Models.HttpHeader; import com.datamotion.Models.Message; import com.datamotion.Models.MessageIdGet; @@ -28,6 +31,7 @@ import com.datamotion.Models.MessageIds; import com.datamotion.Models.MessageSummariesGet; import com.datamotion.Models.MessageSummariesResponse; +import com.datamotion.Models.MessageWithAttachmentMetadata; import com.datamotion.Models.MetaData; import com.datamotion.Models.MimeMessage; import com.datamotion.Models.MoveMessage; @@ -518,6 +522,88 @@ public void retractMessage(int messageId) throws Exception { throw new Exception(response); } } + + public MessageWithAttachmentMetadata getMessageWithoutAttachmentData(int messageId) throws Exception { + MessageWithAttachmentMetadata message = new MessageWithAttachmentMetadata(); + String URL = BaseUrl + "/Message/" + messageId + "/NoAttachmentData"; + String response = ""; + try { + HttpEntity entity = buildHttpGetEntity(URL, assembleCommonHeaders()); + response = IOUtils.toString(entity.getContent(), "UTF-8"); + ObjectMapper objectMapper = new ObjectMapper(); + message = objectMapper.readValue(response, MessageWithAttachmentMetadata.class); + } catch (Exception ex) { + ErrorMessage = response; + throw new Exception(response); + } + return message; + } + + public GetAttachmentResponse getAttachment(int attachmentId) throws Exception { + GetAttachmentResponse attachment = new GetAttachmentResponse(); + String URL = BaseUrl + "/Message/" + attachmentId + "/Attachment"; + String response = ""; + try { + HttpEntity entity = buildHttpGetEntity(URL, assembleCommonHeaders()); + response = IOUtils.toString(entity.getContent(), "UTF-8"); + ObjectMapper objectMapper = new ObjectMapper(); + attachment = objectMapper.readValue(response, GetAttachmentResponse.class); + } catch(Exception ex) { + ErrorMessage = response; + throw new Exception(response); + } + return attachment; + } + + public GetMessageSummariesWithMetadataResponse getMessageSummariesWithMetadata(GetMessageSummariesWithMetadata req) throws Exception { + GetMessageSummariesWithMetadataResponse summaries = new GetMessageSummariesWithMetadataResponse(); + String URL = BaseUrl + "/Message/GetMessageSummariesWithMetadata"; + String JSONreq = buildJSONStringFromObject(req); + String response = ""; + try { + HttpEntity entity = buildHttpPostEntity(URL, JSONreq, assembleCommonHeaders()); + response = IOUtils.toString(entity.getContent(), "UTF-8"); + ObjectMapper objectMapper = new ObjectMapper(); + summaries = objectMapper.readValue(response, GetMessageSummariesWithMetadataResponse.class); + } catch (Exception ex) { + ErrorMessage = response; + throw new Exception(response); + } + return summaries; + } + + public MessageId saveDraft(Message draft) throws Exception { + MessageId messageId = new MessageId(); + String URL = BaseUrl + "/Message/SaveDraft"; + String JSONDraft = buildJSONStringFromObject(draft); + String response = ""; + try { + HttpEntity entity = buildHttpPostEntity(URL, JSONDraft, assembleCommonHeaders()); + response = IOUtils.toString(entity.getContent(), "UTF-8"); + ObjectMapper objectMapper = new ObjectMapper(); + messageId = objectMapper.readValue(response, MessageId.class); + } catch (Exception ex) { + ErrorMessage = response; + throw new Exception(response); + } + return messageId; + } + + public MessageId sendDraft(String draftId) throws Exception { + MessageId messageId = new MessageId(); + String URL = BaseUrl + "/Message/" + draftId + "/SendDraft"; + String response = ""; + try { + HttpEntity entity = buildHttpPostEntity(URL, "", assembleCommonHeaders()); + response = IOUtils.toString(entity.getContent(), "UTF-8"); + ObjectMapper objectMapper = new ObjectMapper(); + messageId = objectMapper.readValue(response, MessageId.class); + } catch (Exception ex) { + ErrorMessage = response; + throw new Exception(response); + } + return messageId; + } } //Auxiliary Functions: @@ -552,7 +638,7 @@ public static String buildJSONStringFromObject(Object object) { public static HttpEntity buildHttpPostEntity(String URL, String body, ArrayList headerList) throws ClientProtocolException, IOException { HttpClient client = HttpClientBuilder.create().build(); HttpPost httpPost = new HttpPost(URL); - StringEntity input = new StringEntity(body); + StringEntity input = new StringEntity(body, "UTF-8"); for (int i = 0; i < headerList.size(); i++) { httpPost.addHeader(headerList.get(i).getKey(), headerList.get(i).getValue()); } diff --git a/src/main/java/com/datamotion/Models/Attachment.java b/src/main/java/com/datamotion/Models/Attachment.java index 0733f89..67057cc 100644 --- a/src/main/java/com/datamotion/Models/Attachment.java +++ b/src/main/java/com/datamotion/Models/Attachment.java @@ -31,18 +31,25 @@ public class Attachment { @JsonProperty("FileName") private String FileName; + /** + * Attachment ContentId + */ + @JsonProperty("ContentId") + private String ContentId; public Attachment() { AttachmentBase64 = null; ContentType = null; FileName = null; + ContentId = null; } - public Attachment(String attachmentBase64, String contentType, String fileName) { + public Attachment(String attachmentBase64, String contentType, String fileName, String contentId) { AttachmentBase64 = attachmentBase64; ContentType = contentType; FileName = fileName; + ContentId = contentId; } @JsonIgnore @@ -92,4 +99,14 @@ public void setFileName(String fileName) { FileName = fileName; } + @JsonIgnore + public String getContentId() { + return ContentId; + } + + @JsonIgnore + public void setContentId(String contentId) { + ContentId = contentId; + } + } diff --git a/src/main/java/com/datamotion/Models/AttachmentMetadata.java b/src/main/java/com/datamotion/Models/AttachmentMetadata.java new file mode 100644 index 0000000..bf5a852 --- /dev/null +++ b/src/main/java/com/datamotion/Models/AttachmentMetadata.java @@ -0,0 +1,73 @@ +package com.datamotion.Models; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class AttachmentMetadata { + @JsonProperty("AttachmentID") + private String AttachmentID; + + @JsonProperty("ContentID") + private String ContentID; + + @JsonProperty("ContentType") + private String ContentType; + + @JsonProperty("FileName") + private String FileName; + + @JsonProperty("Size") + private int Size; + + public AttachmentMetadata() { + // TODO Auto-generated constructor stub + } + + public AttachmentMetadata(String attachmentID, String contentID, String contentType, String fileName, int size) { + AttachmentID = attachmentID; + ContentID = contentID; + ContentType = contentType; + FileName = fileName; + Size = size; + } + + public String getAttachmentID() { + return AttachmentID; + } + + public void setAttachmentID(String attachmentID) { + AttachmentID = attachmentID; + } + + public String getContentID() { + return ContentID; + } + + public void setContentID(String contentID) { + ContentID = contentID; + } + + public String getContentType() { + return ContentType; + } + + public void setContentType(String contentType) { + ContentType = contentType; + } + + public String getFileName() { + return FileName; + } + + public void setFileName(String fileName) { + FileName = fileName; + } + + public int getSize() { + return Size; + } + + public void setSize(int size) { + Size = size; + } +} diff --git a/src/main/java/com/datamotion/Models/Details.java b/src/main/java/com/datamotion/Models/Details.java index 8ff6aea..141bc46 100644 --- a/src/main/java/com/datamotion/Models/Details.java +++ b/src/main/java/com/datamotion/Models/Details.java @@ -33,20 +33,36 @@ public class Details { @JsonProperty("Statistics") private Statistics Statistics; + /** + * Account Uid + */ + @JsonProperty("Uid") + private Integer Uid; + + /** + * Account UserId + */ + @JsonProperty("UserId") + private String UserId; + public Details() { EmailAddress = null; FirstName = null; LastName = null; Statistics = null; + Uid = null; + UserId = null; } public Details(String emailAddress, String firstName, String lastName, - com.datamotion.Models.Statistics statistics) { + com.datamotion.Models.Statistics statistics, Integer uid, String userId) { EmailAddress = emailAddress; FirstName = firstName; LastName = lastName; Statistics = statistics; + Uid = uid; + UserId = userId; } @JsonIgnore @@ -89,4 +105,25 @@ public void setStatistics(Statistics statistics) { Statistics = statistics; } + @JsonIgnore + public Integer getUid(){ + return Uid; + } + + @JsonIgnore + public void setUid(Integer uid){ + Uid = uid; + } + + @JsonIgnore + public String getUserId(){ + return UserId; + } + + @JsonIgnore + public void setUserId(String userId){ + UserId = userId; + } + + } \ No newline at end of file diff --git a/src/main/java/com/datamotion/Models/GetAttachmentResponse.java b/src/main/java/com/datamotion/Models/GetAttachmentResponse.java new file mode 100644 index 0000000..50742be --- /dev/null +++ b/src/main/java/com/datamotion/Models/GetAttachmentResponse.java @@ -0,0 +1,73 @@ +package com.datamotion.Models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class GetAttachmentResponse { + @JsonProperty("AttachmentBase64") + private String AttachmentBase64; + + @JsonProperty("ContentID") + private String ContentID; + + @JsonProperty("ContentType") + private String ContentType; + + @JsonProperty("FileName") + private String FileName; + + @JsonProperty("Size") + private int Size; + + public GetAttachmentResponse() { + // TODO Auto-generated constructor stub + } + + public GetAttachmentResponse(String attachmentBase64, String contentID, String contentType, String fileName, + int size) { + AttachmentBase64 = attachmentBase64; + ContentID = contentID; + ContentType = contentType; + FileName = fileName; + Size = size; + } + + public String getAttachmentBase64() { + return AttachmentBase64; + } + + public void setAttachmentBase64(String attachmentBase64) { + AttachmentBase64 = attachmentBase64; + } + + public String getContentID() { + return ContentID; + } + + public void setContentID(String contentID) { + ContentID = contentID; + } + + public String getContentType() { + return ContentType; + } + + public void setContentType(String contentType) { + ContentType = contentType; + } + + public String getFileName() { + return FileName; + } + + public void setFileName(String fileName) { + FileName = fileName; + } + + public int getSize() { + return Size; + } + + public void setSize(int size) { + Size = size; + } +} diff --git a/src/main/java/com/datamotion/Models/GetMessageSummariesWithMetadata.java b/src/main/java/com/datamotion/Models/GetMessageSummariesWithMetadata.java new file mode 100644 index 0000000..967b34e --- /dev/null +++ b/src/main/java/com/datamotion/Models/GetMessageSummariesWithMetadata.java @@ -0,0 +1,36 @@ +package com.datamotion.Models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class GetMessageSummariesWithMetadata { + @JsonProperty("FolderId") + private int FolderId; + + @JsonProperty("LastMessageIdReceived") + private int LastMessageIdReceived; + + public GetMessageSummariesWithMetadata() { + // TODO Auto-generated constructor stub + } + + public GetMessageSummariesWithMetadata(int folderId, int lastMessageIdReceived) { + FolderId = folderId; + LastMessageIdReceived = lastMessageIdReceived; + } + + public int getFolderId() { + return FolderId; + } + + public void setFolderId(int folderId) { + FolderId = folderId; + } + + public int getLastMessageIdReceived() { + return LastMessageIdReceived; + } + + public void setLastMessageIdReceived(int lastMessageIdReceived) { + LastMessageIdReceived = lastMessageIdReceived; + } +} diff --git a/src/main/java/com/datamotion/Models/GetMessageSummariesWithMetadataResponse.java b/src/main/java/com/datamotion/Models/GetMessageSummariesWithMetadataResponse.java new file mode 100644 index 0000000..de71a08 --- /dev/null +++ b/src/main/java/com/datamotion/Models/GetMessageSummariesWithMetadataResponse.java @@ -0,0 +1,26 @@ +package com.datamotion.Models; + +import java.util.ArrayList; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class GetMessageSummariesWithMetadataResponse { + @JsonProperty("Summaries") + private ArrayList Summaries; + + public GetMessageSummariesWithMetadataResponse() { + // TODO Auto-generated constructor stub + } + + public GetMessageSummariesWithMetadataResponse(ArrayList summaries) { + Summaries = summaries; + } + + public ArrayList getSummaries() { + return Summaries; + } + + public void setSummaries(ArrayList summaries) { + Summaries = summaries; + } +} diff --git a/src/main/java/com/datamotion/Models/MessageSummariesWithMetadaSummary.java b/src/main/java/com/datamotion/Models/MessageSummariesWithMetadaSummary.java new file mode 100644 index 0000000..45ef583 --- /dev/null +++ b/src/main/java/com/datamotion/Models/MessageSummariesWithMetadaSummary.java @@ -0,0 +1,173 @@ +package com.datamotion.Models; + +import java.util.ArrayList; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class MessageSummariesWithMetadaSummary { + @JsonProperty("AttachmentCount") + private int AttachmentCount; + + @JsonProperty("createTimeString") + private String createTimeString; + + @JsonProperty("FolderId") + private int FolderId; + + @JsonProperty("MessageId") + private int MessageId; + + @JsonProperty("MessageSize") + private int MessageSize; + + @JsonProperty("Read") + private boolean Read; + + @JsonProperty("MessageStatus") + private int MessageStatus; + + @JsonProperty("SenderAddress") + private String SenderAddress; + + @JsonProperty("Subject") + private String Subject; + + @JsonProperty("Attachments") + private ArrayList Attachments; + + @JsonProperty("ExpirationDate") + private String ExpirationDate; + + @JsonProperty("SecurityEnvelope") + private SecurityEnvelope SecurityEnvelope; + + @JsonProperty("Tracking") + private Tracking Tracking; + + public MessageSummariesWithMetadaSummary() { + // TODO Auto-generated constructor stub + } + + public MessageSummariesWithMetadaSummary(int attachmentCount, String createTimeString, int folderId, int messageId, + int messageSize, boolean read, int messageStatus, String senderAddress, String subject, + ArrayList attachments, String expirationDate, + com.datamotion.Models.SecurityEnvelope securityEnvelope, com.datamotion.Models.Tracking tracking) { + AttachmentCount = attachmentCount; + this.createTimeString = createTimeString; + FolderId = folderId; + MessageId = messageId; + MessageSize = messageSize; + Read = read; + MessageStatus = messageStatus; + SenderAddress = senderAddress; + Subject = subject; + Attachments = attachments; + ExpirationDate = expirationDate; + SecurityEnvelope = securityEnvelope; + Tracking = tracking; + } + + public int getAttachmentCount() { + return AttachmentCount; + } + + public void setAttachmentCount(int attachmentCount) { + AttachmentCount = attachmentCount; + } + + public String getCreateTimeString() { + return createTimeString; + } + + public void setCreateTimeString(String createTimeString) { + this.createTimeString = createTimeString; + } + + public int getFolderId() { + return FolderId; + } + + public void setFolderId(int folderId) { + FolderId = folderId; + } + + public int getMessageId() { + return MessageId; + } + + public void setMessageId(int messageId) { + MessageId = messageId; + } + + public int getMessageSize() { + return MessageSize; + } + + public void setMessageSize(int messageSize) { + MessageSize = messageSize; + } + + public boolean isRead() { + return Read; + } + + public void setRead(boolean read) { + Read = read; + } + + public int getMessageStatus() { + return MessageStatus; + } + + public void setMessageStatus(int messageStatus) { + MessageStatus = messageStatus; + } + + public String getSenderAddress() { + return SenderAddress; + } + + public void setSenderAddress(String senderAddress) { + SenderAddress = senderAddress; + } + + public String getSubject() { + return Subject; + } + + public void setSubject(String subject) { + Subject = subject; + } + + public ArrayList getAttachments() { + return Attachments; + } + + public void setAttachments(ArrayList attachments) { + Attachments = attachments; + } + + public String getExpirationDate() { + return ExpirationDate; + } + + public void setExpirationDate(String expirationDate) { + ExpirationDate = expirationDate; + } + + public SecurityEnvelope getSecurityEnvelope() { + return SecurityEnvelope; + } + + public void setSecurityEnvelope(SecurityEnvelope securityEnvelope) { + SecurityEnvelope = securityEnvelope; + } + + public Tracking getTracking() { + return Tracking; + } + + public void setTracking(Tracking tracking) { + Tracking = tracking; + } +} diff --git a/src/main/java/com/datamotion/Models/MessageWithAttachmentMetadata.java b/src/main/java/com/datamotion/Models/MessageWithAttachmentMetadata.java new file mode 100644 index 0000000..6b9099c --- /dev/null +++ b/src/main/java/com/datamotion/Models/MessageWithAttachmentMetadata.java @@ -0,0 +1,125 @@ +package com.datamotion.Models; + +import java.util.ArrayList; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; + +public class MessageWithAttachmentMetadata { + @JsonProperty("To") + private ArrayList To; + + @JsonProperty("From") + private String From; + + @JsonProperty("Cc") + private ArrayList Cc; + + @JsonProperty("Bcc") + private ArrayList Bcc; + + @JsonProperty("Subject") + private String Subject; + + @JsonProperty("CreateTime") + private String CreateTime; + + @JsonProperty("HtmlBody") + private String HtmlBody; + + @JsonProperty("TextBody") + private String TextBody; + + @JsonProperty("Attachments") + private ArrayList Attachments; + + public MessageWithAttachmentMetadata() { + // TODO Auto-generated constructor stub + } + + public MessageWithAttachmentMetadata(ArrayList to, String from, ArrayList cc, ArrayList bcc, + String subject, String createTime, String htmlBody, String textBody, + ArrayList attachments) { + To = to; + From = from; + Cc = cc; + Bcc = bcc; + Subject = subject; + CreateTime = createTime; + HtmlBody = htmlBody; + TextBody = textBody; + Attachments = attachments; + } + + public ArrayList getTo() { + return To; + } + + public void setTo(ArrayList to) { + To = to; + } + + public String getFrom() { + return From; + } + + public void setFrom(String from) { + From = from; + } + + public ArrayList getCc() { + return Cc; + } + + public void setCc(ArrayList cc) { + Cc = cc; + } + + public ArrayList getBcc() { + return Bcc; + } + + public void setBcc(ArrayList bcc) { + Bcc = bcc; + } + + public String getSubject() { + return Subject; + } + + public void setSubject(String subject) { + Subject = subject; + } + + public String getCreateTime() { + return CreateTime; + } + + public void setCreateTime(String createTime) { + CreateTime = createTime; + } + + public String getHtmlBody() { + return HtmlBody; + } + + public void setHtmlBody(String htmlBody) { + HtmlBody = htmlBody; + } + + public String getTextBody() { + return TextBody; + } + + public void setTextBody(String textBody) { + TextBody = textBody; + } + + public ArrayList getAttachments() { + return Attachments; + } + + public void setAttachments(ArrayList attachments) { + Attachments = attachments; + } +} diff --git a/src/main/java/com/datamotion/Models/MessageWithMetadataAttachment.java b/src/main/java/com/datamotion/Models/MessageWithMetadataAttachment.java new file mode 100644 index 0000000..7b8616c --- /dev/null +++ b/src/main/java/com/datamotion/Models/MessageWithMetadataAttachment.java @@ -0,0 +1,86 @@ +package com.datamotion.Models; + +import com.fasterxml.jackson.annotation.JsonProperty; + +public class MessageWithMetadataAttachment { + @JsonProperty("AttachmentId") + private int AttachmentId; + + @JsonProperty("ContentID") + private String ContentID; + + @JsonProperty("FileName") + private String FileName; + + @JsonProperty("Size") + private Size Size; + + @JsonProperty("SecurityEnvelope") + private SecurityEnvelope SecurityEnvelope; + + @JsonProperty("Tracking") + private MetaTracking Tracking; + + public MessageWithMetadataAttachment() { + // TODO Auto-generated constructor stub + } + + public MessageWithMetadataAttachment(int attachmentId, String contentID, String fileName, + com.datamotion.Models.Size size, com.datamotion.Models.SecurityEnvelope securityEnvelope, + MetaTracking tracking) { + AttachmentId = attachmentId; + ContentID = contentID; + FileName = fileName; + Size = size; + SecurityEnvelope = securityEnvelope; + Tracking = tracking; + } + + public int getAttachmentId() { + return AttachmentId; + } + + public void setAttachmentId(int attachmentId) { + AttachmentId = attachmentId; + } + + public String getContentID() { + return ContentID; + } + + public void setContentID(String contentID) { + ContentID = contentID; + } + + public String getFileName() { + return FileName; + } + + public void setFileName(String fileName) { + FileName = fileName; + } + + public Size getSize() { + return Size; + } + + public void setSize(Size size) { + Size = size; + } + + public SecurityEnvelope getSecurityEnvelope() { + return SecurityEnvelope; + } + + public void setSecurityEnvelope(SecurityEnvelope securityEnvelope) { + SecurityEnvelope = securityEnvelope; + } + + public MetaTracking getTracking() { + return Tracking; + } + + public void setTracking(MetaTracking tracking) { + Tracking = tracking; + } +} diff --git a/src/test/java/com/datamotionTest/Tests/GetMessageMetadataTest.java b/src/test/java/com/datamotionTest/Tests/GetMessageMetadataTest.java index 1bacbf2..75c95f3 100644 --- a/src/test/java/com/datamotionTest/Tests/GetMessageMetadataTest.java +++ b/src/test/java/com/datamotionTest/Tests/GetMessageMetadataTest.java @@ -24,7 +24,7 @@ public void test() throws Exception { ArrayList cc = new ArrayList(); ArrayList bcc = new ArrayList(); ArrayList attachments = new ArrayList(); - Attachment attachment = new Attachment("dGhpcyBpcyBhIHRlc3QgZmlsZQ==", "text/plain", "test.txt"); + Attachment attachment = new Attachment("dGhpcyBpcyBhIHRlc3QgZmlsZQ==", "text/plain", "test.txt", null); attachments.add(attachment); Message message = new Message(to, "UnitTest1@dmfaketest.com", cc, bcc, "TestSubject", "CreateTime", attachments, "content", "content"); int messageId = tester.Message.sendMessage(message).getMessageId(); diff --git a/src/test/java/com/datamotionTest/Tests/GetMessageTest.java b/src/test/java/com/datamotionTest/Tests/GetMessageTest.java index 2332cd4..6c5cee3 100644 --- a/src/test/java/com/datamotionTest/Tests/GetMessageTest.java +++ b/src/test/java/com/datamotionTest/Tests/GetMessageTest.java @@ -23,7 +23,7 @@ public void test() throws Exception { ArrayList cc = new ArrayList(); ArrayList bcc = new ArrayList(); ArrayList attachments = new ArrayList(); - Attachment attachment = new Attachment("dGhpcyBpcyBhIHRlc3QgZmlsZQ==", "text/plain", "test.txt"); + Attachment attachment = new Attachment("dGhpcyBpcyBhIHRlc3QgZmlsZQ==", "text/plain", "test.txt", null); attachments.add(attachment); Message message = new Message(to, "UnitTest1@dmfaketest.com", cc, bcc, "TestSubject", "CreateTime", attachments, "content", "content"); int messageId = tester.Message.sendMessage(message).getMessageId(); diff --git a/src/test/java/com/datamotionTest/Tests/GetMimeMessageTest.java b/src/test/java/com/datamotionTest/Tests/GetMimeMessageTest.java index 22b14ab..f76aef5 100644 --- a/src/test/java/com/datamotionTest/Tests/GetMimeMessageTest.java +++ b/src/test/java/com/datamotionTest/Tests/GetMimeMessageTest.java @@ -24,7 +24,7 @@ public void test() throws Exception { ArrayList cc = new ArrayList(); ArrayList bcc = new ArrayList(); ArrayList attachments = new ArrayList(); - Attachment attachment = new Attachment("dGhpcyBpcyBhIHRlc3QgZmlsZQ==", "text/plain", "test.txt"); + Attachment attachment = new Attachment("dGhpcyBpcyBhIHRlc3QgZmlsZQ==", "text/plain", "test.txt", null); attachments.add(attachment); Message message = new Message(to, "UnitTest1@dmfaketest.com", cc, bcc, "TestSubject", "CreateTime", attachments, "content", "content"); int messageId = tester.Message.sendMessage(message).getMessageId(); diff --git a/src/test/java/com/datamotionTest/Tests/MoveMessageTest.java b/src/test/java/com/datamotionTest/Tests/MoveMessageTest.java index 07cba13..c419d34 100644 --- a/src/test/java/com/datamotionTest/Tests/MoveMessageTest.java +++ b/src/test/java/com/datamotionTest/Tests/MoveMessageTest.java @@ -34,7 +34,7 @@ public void test() throws Exception { ArrayList cc = new ArrayList(); ArrayList bcc = new ArrayList(); ArrayList attachments = new ArrayList(); - Attachment attachment = new Attachment("dGhpcyBpcyBhIHRlc3QgZmlsZQ==", "text/plain", "test.txt"); + Attachment attachment = new Attachment("dGhpcyBpcyBhIHRlc3QgZmlsZQ==", "text/plain", "test.txt", null); attachments.add(attachment); Message message = new Message(to, context.getUsername(), cc, bcc, "TestSubject", "CreateTime", attachments, "content", "content"); int messageId = tester.Message.sendMessage(message).getMessageId(); diff --git a/src/test/java/com/datamotionTest/Tests/SendDeleteMessageTest.java b/src/test/java/com/datamotionTest/Tests/SendDeleteMessageTest.java index b057eca..9812104 100644 --- a/src/test/java/com/datamotionTest/Tests/SendDeleteMessageTest.java +++ b/src/test/java/com/datamotionTest/Tests/SendDeleteMessageTest.java @@ -23,7 +23,7 @@ public void test() throws Exception { ArrayList cc = new ArrayList(); ArrayList bcc = new ArrayList(); ArrayList attachments = new ArrayList(); - Attachment attachment = new Attachment("dGhpcyBpcyBhIHRlc3QgZmlsZQ==", "text/plain", "test.txt"); + Attachment attachment = new Attachment("dGhpcyBpcyBhIHRlc3QgZmlsZQ==", "text/plain", "test.txt", null); attachments.add(attachment); Message message = new Message(to, "UnitTest1@dmfaketest.com", cc, bcc, "TestSubject", "CreateTime", attachments, "content", "content"); int messageId = tester.Message.sendMessage(message).getMessageId(); diff --git a/userpass.txt b/userpass.txt index e69de29..8b13789 100644 --- a/userpass.txt +++ b/userpass.txt @@ -0,0 +1 @@ +