FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
postmark-java/src/test/java/unit/data/BounceTest.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
/
data
/
BounceTest.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
41 lines (34 loc) · 1.15 KB
Breadcrumbs
postmark-java
/
src
/
test
/
java
/
unit
/
data
/
BounceTest.java
Copy path
File metadata and controls
41 lines (34 loc) · 1.15 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
package
unit
.
data
;
import
base
.
BaseTest
;
import
com
.
postmarkapp
.
postmark
.
client
.
data
.
parser
.
DataHandler
;
import
com
.
postmarkapp
.
postmark
.
client
.
data
.
model
.
bounces
.
Bounce
;
import
com
.
postmarkapp
.
postmark
.
client
.
data
.
model
.
bounces
.
Bounces
;
import
org
.
junit
.
jupiter
.
api
.
Test
;
import
java
.
io
.
IOException
;
import
java
.
util
.
ArrayList
;
import
java
.
util
.
List
;
import
static
org
.
junit
.
jupiter
.
api
.
Assertions
.
assertEquals
;
/**
* Bounce data tests.
*/
public
class
BounceTest
extends
BaseTest
{
DataHandler
dataHandler
=
new
DataHandler
();
@
Test
void
bouncesData
()
throws
IOException
{
String
expected_data
=
"{
\n
"
+
"
\"
TotalCount
\"
: 0,
\n
"
+
"
\"
Bounces
\"
: [ {
\n
"
+
"
\"
Id
\"
: 1,
\n
"
+
"
\"
Content
\"
:
\"
test
\"
\n
"
+
" } ]
\n
"
+
"}"
;
Bounce
bounce
=
new
Bounce
();
bounce
.
setId
(
1L
);
bounce
.
setContent
(
"test"
);
List
<
Bounce
>
data
=
new
ArrayList
<>();
data
.
add
(
bounce
);
Bounces
bounces
=
new
Bounces
();
bounces
.
setBounces
(
data
);
assertEquals
(
dataHandler
.
toJson
(
bounces
),
expected_data
);
}
}
Back
|
FazBrowse Home
|
New Git URL