-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from hawx/use-https-by-default
Use https by default
- Loading branch information
Showing
23 changed files
with
99 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
language: java |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,9 @@ | ||
package com.esendex.java.sdk; | ||
|
||
import esendex.sdk.java.EsendexException; | ||
import esendex.sdk.java.EsendexProperties; | ||
import esendex.sdk.java.ServiceFactory; | ||
import esendex.sdk.java.service.auth.UserPassword; | ||
import esendex.sdk.java.service.impl.IServiceFactory; | ||
|
||
public abstract class BaseTest { | ||
|
||
public static boolean IsSessionMode = false; | ||
|
||
public static final String USER; | ||
public static final String PASSWORD; | ||
public static final String ACCOUNT; | ||
public static final String DESTINATION_NUMBER; | ||
private static final UserPassword userPassword; | ||
|
||
|
||
static { | ||
EsendexTestProperties testProperties = EsendexTestProperties.instance(); | ||
|
||
USER = testProperties.getUsername(); | ||
PASSWORD = testProperties.getPassword(); | ||
ACCOUNT = testProperties.getAccount(); | ||
DESTINATION_NUMBER = testProperties.getDestinationNumber(); | ||
|
||
userPassword = new UserPassword(USER, PASSWORD); | ||
|
||
String domain = testProperties.getDomain(); | ||
|
||
if(domain != null) | ||
EsendexProperties.instance().setProperty("esendex.domain", domain); | ||
} | ||
|
||
public static IServiceFactory getFactory() throws EsendexException { | ||
return IsSessionMode | ||
? getBasicFactory() | ||
: getSessionFactory(); | ||
} | ||
|
||
private static IServiceFactory getBasicFactory() { | ||
|
||
if (basicFactory == null) | ||
basicFactory = ServiceFactory.createBasicAuthenticatingFactory(userPassword); | ||
return basicFactory; | ||
} | ||
private static IServiceFactory basicFactory; | ||
|
||
private static IServiceFactory getSessionFactory() throws EsendexException { | ||
|
||
if (sessionFactory == null) | ||
sessionFactory = ServiceFactory.createSessionAuthenticatingFactory(userPassword); | ||
return sessionFactory; | ||
EsendexProperties.instance().setProperty("esendex.secure", "false"); | ||
} | ||
private static IServiceFactory sessionFactory; | ||
} |
This file was deleted.
Oops, something went wrong.
59 changes: 59 additions & 0 deletions
59
src/test/java/com/esendex/java/sdk/integration/BaseTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package com.esendex.java.sdk.integration; | ||
|
||
import com.esendex.java.sdk.EsendexTestProperties; | ||
import esendex.sdk.java.EsendexException; | ||
import esendex.sdk.java.EsendexProperties; | ||
import esendex.sdk.java.ServiceFactory; | ||
import esendex.sdk.java.service.auth.UserPassword; | ||
import esendex.sdk.java.service.impl.IServiceFactory; | ||
|
||
public abstract class BaseTest { | ||
|
||
public static boolean IsSessionMode = false; | ||
|
||
public static final String USER; | ||
public static final String PASSWORD; | ||
public static final String ACCOUNT; | ||
public static final String DESTINATION_NUMBER; | ||
private static final UserPassword userPassword; | ||
|
||
|
||
static { | ||
EsendexTestProperties testProperties = EsendexTestProperties.instance(); | ||
|
||
USER = testProperties.getUsername(); | ||
PASSWORD = testProperties.getPassword(); | ||
ACCOUNT = testProperties.getAccount(); | ||
DESTINATION_NUMBER = testProperties.getDestinationNumber(); | ||
|
||
userPassword = new UserPassword(USER, PASSWORD); | ||
|
||
String domain = testProperties.getDomain(); | ||
|
||
EsendexProperties.instance().setProperty("esendex.secure", "false"); | ||
if (domain != null) | ||
EsendexProperties.instance().setProperty("esendex.domain", domain); | ||
} | ||
|
||
public static IServiceFactory getFactory() throws EsendexException { | ||
return IsSessionMode | ||
? getBasicFactory() | ||
: getSessionFactory(); | ||
} | ||
|
||
private static IServiceFactory getBasicFactory() { | ||
|
||
if (basicFactory == null) | ||
basicFactory = ServiceFactory.createBasicAuthenticatingFactory(userPassword); | ||
return basicFactory; | ||
} | ||
private static IServiceFactory basicFactory; | ||
|
||
private static IServiceFactory getSessionFactory() throws EsendexException { | ||
|
||
if (sessionFactory == null) | ||
sessionFactory = ServiceFactory.createSessionAuthenticatingFactory(userPassword); | ||
return sessionFactory; | ||
} | ||
private static IServiceFactory sessionFactory; | ||
} |
3 changes: 1 addition & 2 deletions
3
...st/java/com/esendex/java/sdk/integration/contactsservice/ContactsServiceGetContactIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 1 addition & 6 deletions
7
src/test/java/com/esendex/java/sdk/integration/inboxservice/InboxServiceDeleteIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/com/esendex/java/sdk/integration/inboxservice/InboxServiceGetMessageIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/com/esendex/java/sdk/integration/inboxservice/InboxServiceGetMessagesIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...st/java/com/esendex/java/sdk/integration/inboxservice/InboxServiceGetPagedMessagesIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/com/esendex/java/sdk/integration/inboxservice/InboxServiceMarkIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../esendex/java/sdk/integration/messagingservice/SendServiceMultiScheduledSmsMessageIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../java/com/esendex/java/sdk/integration/messagingservice/SendServiceMultiSmsMessageIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...om/esendex/java/sdk/integration/messagingservice/SendServiceSingleScheduledMessageIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...java/com/esendex/java/sdk/integration/messagingservice/SendServiceSingleSmsMessageIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...java/com/esendex/java/sdk/integration/messagingservice/SendServiceSingleUnicodeSMSIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/com/esendex/java/sdk/integration/sentservice/SentServiceGetMessageIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/com/esendex/java/sdk/integration/sentservice/SentServiceGetMessagesIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...com/esendex/java/sdk/integration/sentservice/session/SessionSentServiceGetMessagesIT.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters