FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
amadeus-java/src/test/java/com/amadeus/ParamsTest.java at master · alnacle/amadeus-java · GitHub
alnacle
/
amadeus-java
Public
forked from
amadeus4dev/amadeus-java
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Wiki
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
amadeus-java
/
src
/
test
/
java
/
com
/
amadeus
/
ParamsTest.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
33 lines (27 loc) · 948 Bytes
Breadcrumbs
amadeus-java
/
src
/
test
/
java
/
com
/
amadeus
/
ParamsTest.java
Copy path
File metadata and controls
33 lines (27 loc) · 948 Bytes
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
package
com
.
amadeus
;
import
java
.
io
.
UnsupportedEncodingException
;
import
org
.
junit
.
Assert
;
import
org
.
junit
.
Test
;
public
class
ParamsTest
{
@
Test
(
expected
=
NullPointerException
.
class
)
public
void
testNullKeyValueWith
() {
Params
.
with
(
null
,
"123"
);
}
@
Test
(
expected
=
NullPointerException
.
class
)
public
void
testNullKeyValueAnd
() {
Params
.
with
(
"foo"
,
"123"
).
and
(
null
,
"234"
);
}
@
Test
public
void
testToQueryString
() {
Params
params
=
Params
.
with
(
"foo"
,
"123"
).
and
(
"bar"
,
"234"
);
Assert
.
assertEquals
(
params
.
toQueryString
(),
"bar=234&foo=123"
);
}
@
Test
public
void
testToQueryStringWithEncodingError
() {
Params
params
=
Params
.
with
(
"foo"
,
"123"
);
params
.
encoding
=
"foobar"
;
Assert
.
assertEquals
(
params
.
toQueryString
(),
""
);
}
@
Test
public
void
testToString
() {
Params
params
=
Params
.
with
(
"foo"
,
"123"
).
and
(
"bar"
,
"234"
);
Assert
.
assertEquals
(
params
.
toString
(),
"bar=234&foo=123"
);
}
}
Back
|
FazBrowse Home
|
New Git URL