Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
pc-dhutton committed Mar 23, 2021
1 parent d0bc8ae commit d07d732
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 4 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Salesforce Marketing Cloud Java SDK - TEST
Salesforce Marketing Cloud Java SDK
===================================

The Salesforce Marketing Cloud Java SDK enables developers to easily
Expand All @@ -25,6 +25,10 @@ Java platform. Among other things, the SDK:
For more information about the Java SDK and how to use it, please see
the Javadocs at http://salesforce-marketingcloud.github.io/FuelSDK-Java/.

New Features in Version 1.5.2
------------
* Added Support for SubscriberResult ErrorCodeID

New Features in Version 1.5.1
------------
* Added Support for Java 11
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.github.salesforce-marketingcloud</groupId>
<artifactId>fuelsdk</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
<name>Salesforce Marketing Cloud Java SDK</name>
<description>Salesforce Marketing Cloud Java SDK</description>
<url>https://github.com/salesforce-marketingcloud/FuelSDK-Java</url>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/etframework.wsdl
Original file line number Diff line number Diff line change
Expand Up @@ -2421,6 +2421,7 @@
<element name="ErrorCode" minOccurs="1" maxOccurs="1" type="xsd:string" />
<element name="ErrorDescription" minOccurs="0" maxOccurs="1" type="xsd:string" />
<element name="Ordinal" minOccurs="0" type="xsd:int" />
<element name="ErrorCodeID" minOccurs="0" maxOccurs="1" type="xsd:int" />
</sequence>
</complexType>
<element name="SubscriberResult" type="tns:SubscriberResult" />
Expand Down
62 changes: 60 additions & 2 deletions src/test/java/com/exacttarget/fuelsdk/ETTriggeredTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,17 @@
*/
package com.exacttarget.fuelsdk;

import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.UUID;

import com.exacttarget.fuelsdk.internal.*;
import com.exacttarget.fuelsdk.annotations.*;
import java.util.*;
import org.junit.Assert;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.fail;
import org.junit.BeforeClass;
import org.junit.FixMethodOrder;
import org.junit.Test;
Expand Down Expand Up @@ -221,6 +223,62 @@ public void a7_deleteTSD(){
ex.printStackTrace();
}
}

@Test
public void fuelSdkSendEmailWithValidEmail()
{
try
{
ETTriggeredEmail triggeredSendDefinition = new ETTriggeredEmail();
triggeredSendDefinition.setCustomerKey(tsName);
triggeredSendDefinition.setClient(client);

ETSubscriber subscriber = new ETSubscriber();
subscriber.setEmailAddress("jane.doe@gmail.com");
subscriber.setSubscriberKey("jane.doe@gmail.com");

List<ETSubscriber> subscribers = new ArrayList<ETSubscriber>();
subscribers.add(subscriber);
ETResponse<ETTriggeredEmail> createResponse = triggeredSendDefinition
.send(subscribers);
System.out.println("TEST");

assertEquals(createResponse.getResponseCode(), "OK");
assertEquals(createResponse.getResponseMessage(), "TriggeredSendDefinition deleted");

}
catch (Exception ex)
{
fail(ex.toString());
}
}

@Test
public void fuelSdkSendEmailWithInValidEmail()
{
try
{
ETTriggeredEmail triggeredSendDefinition = new ETTriggeredEmail();
triggeredSendDefinition.setCustomerKey(tsName);
triggeredSendDefinition.setClient(client);

ETSubscriber subscriber = new ETSubscriber();
subscriber.setEmailAddress("jane.doe+spam@gmail.com");
subscriber.setSubscriberKey("jane.doe+spam@gmail.com");

List<ETSubscriber> subscribers = new ArrayList<ETSubscriber>();
subscribers.add(subscriber);
ETResponse<ETTriggeredEmail> createResponse = triggeredSendDefinition
.send(subscribers);

assertEquals(createResponse.getResponseCode(), "Error");

}
catch (Exception ex)
{
fail(ex.toString());
}
}

/* public static void main(String[] args){
System.out.println("Hello World");
Expand Down

0 comments on commit d07d732

Please sign in to comment.