FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
postmark-java/src/test/java/unit/PostmarkTest.java at main · ActiveCampaign/postmark-java · GitHub
ActiveCampaign
/
postmark-java
Public
Notifications
You must be signed in to change notification settings
Fork
31
Star
45
Code
Issues
6
Pull requests
5
Discussions
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
postmark-java
/
src
/
test
/
java
/
unit
/
PostmarkTest.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
68 lines (53 loc) · 2.03 KB
Breadcrumbs
postmark-java
/
src
/
test
/
java
/
unit
/
PostmarkTest.java
Copy path
File metadata and controls
68 lines (53 loc) · 2.03 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package
unit
;
import
base
.
BaseTest
;
import
com
.
postmarkapp
.
postmark
.
Postmark
;
import
com
.
postmarkapp
.
postmark
.
client
.
AccountApiClient
;
import
com
.
postmarkapp
.
postmark
.
client
.
ApiClient
;
import
com
.
postmarkapp
.
postmark
.
client
.
Parameters
;
import
com
.
postmarkapp
.
postmark
.
client
.
data
.
model
.
bounces
.
Bounces
;
import
com
.
postmarkapp
.
postmark
.
client
.
exception
.
PostmarkException
;
import
org
.
junit
.
jupiter
.
api
.
Test
;
import
java
.
io
.
IOException
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.*;
/**
* Created by bash on 11/8/17.
*/
public
class
PostmarkTest
extends
BaseTest
{
String
apiToken
=
"POSTMARK_API_TEST"
;
@
Test
void
getApiClient
()
throws
IOException
{
assertNotNull
(
Postmark
.
getApiClient
(
apiToken
));
}
@
Test
void
getApiClientSecure
() {
assertNotNull
(
Postmark
.
getApiClient
(
apiToken
,
true
));
}
@
Test
void
getApiClientCustomBaseUrl
()
throws
IOException
,
PostmarkException
{
ApiClient
client
=
Postmark
.
getApiClient
(
apiToken
,
true
,
"example.com"
);
assertEquals
(
client
.
getBaseUrl
(),
"example.com"
);
}
@
Test
void
getApiClientCustomUrl
()
throws
IOException
,
PostmarkException
{
ApiClient
client
=
Postmark
.
getApiClient
(
apiToken
,
true
,
"example.com"
);
assertEquals
(
client
.
getEndpointUrl
(
"/test"
),
"example.com/test"
);
}
@
Test
void
getAccountApiClient
() {
assertNotNull
(
Postmark
.
getAccountApiClient
(
apiToken
));
}
@
Test
void
getAccountApiClientSecure
() {
assertNotNull
(
Postmark
.
getAccountApiClient
(
apiToken
,
true
));
}
@
Test
void
getAccountApiClientCustomBaseUrl
()
throws
IOException
,
PostmarkException
{
AccountApiClient
client
=
Postmark
.
getAccountApiClient
(
apiToken
,
true
,
"example.com"
);
assertEquals
(
client
.
getBaseUrl
(),
"example.com"
);
}
@
Test
void
getAccountApiClientCustomUrl
()
throws
IOException
,
PostmarkException
{
AccountApiClient
client
=
Postmark
.
getAccountApiClient
(
apiToken
,
true
,
"example.com"
);
assertEquals
(
client
.
getEndpointUrl
(
"/test"
),
"example.com/test"
);
}
}
Back
|
FazBrowse Home
|
New Git URL