From d0bc8ae9d7e4758d2316225aa142db94f4e2a21d Mon Sep 17 00:00:00 2001 From: Dean Hutton Date: Tue, 23 Mar 2021 13:50:48 -0700 Subject: [PATCH 1/3] This is a test --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 175d7def..b435cac9 100755 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -Salesforce Marketing Cloud Java SDK +Salesforce Marketing Cloud Java SDK - TEST =================================== The Salesforce Marketing Cloud Java SDK enables developers to easily From d07d732a20e980eb38c55473cf1ba7e9f8e6c20b Mon Sep 17 00:00:00 2001 From: Dean Hutton Date: Tue, 23 Mar 2021 13:54:15 -0700 Subject: [PATCH 2/3] fixes #128 --- README.md | 6 +- pom.xml | 2 +- src/main/resources/etframework.wsdl | 1 + .../exacttarget/fuelsdk/ETTriggeredTest.java | 62 ++++++++++++++++++- 4 files changed, 67 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b435cac9..84d463f7 100755 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/pom.xml b/pom.xml index fedab43a..ec47127e 100755 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.github.salesforce-marketingcloud fuelsdk - 1.5.1 + 1.5.2 Salesforce Marketing Cloud Java SDK Salesforce Marketing Cloud Java SDK https://github.com/salesforce-marketingcloud/FuelSDK-Java diff --git a/src/main/resources/etframework.wsdl b/src/main/resources/etframework.wsdl index a1b15af9..bb3f167a 100755 --- a/src/main/resources/etframework.wsdl +++ b/src/main/resources/etframework.wsdl @@ -2421,6 +2421,7 @@ + diff --git a/src/test/java/com/exacttarget/fuelsdk/ETTriggeredTest.java b/src/test/java/com/exacttarget/fuelsdk/ETTriggeredTest.java index dfa806cc..01ee349b 100644 --- a/src/test/java/com/exacttarget/fuelsdk/ETTriggeredTest.java +++ b/src/test/java/com/exacttarget/fuelsdk/ETTriggeredTest.java @@ -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; @@ -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 subscribers = new ArrayList(); + subscribers.add(subscriber); + ETResponse 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 subscribers = new ArrayList(); + subscribers.add(subscriber); + ETResponse 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"); From 95864983a0de4c2826c9ccb7cf7ea55e17b539b6 Mon Sep 17 00:00:00 2001 From: Dean Hutton Date: Tue, 23 Mar 2021 14:17:27 -0700 Subject: [PATCH 3/3] Fix test --- src/test/java/com/exacttarget/fuelsdk/ETTriggeredTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/test/java/com/exacttarget/fuelsdk/ETTriggeredTest.java b/src/test/java/com/exacttarget/fuelsdk/ETTriggeredTest.java index 01ee349b..2df86e30 100644 --- a/src/test/java/com/exacttarget/fuelsdk/ETTriggeredTest.java +++ b/src/test/java/com/exacttarget/fuelsdk/ETTriggeredTest.java @@ -241,10 +241,8 @@ public void fuelSdkSendEmailWithValidEmail() subscribers.add(subscriber); ETResponse createResponse = triggeredSendDefinition .send(subscribers); - System.out.println("TEST"); assertEquals(createResponse.getResponseCode(), "OK"); - assertEquals(createResponse.getResponseMessage(), "TriggeredSendDefinition deleted"); } catch (Exception ex)