FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
scribe-java/src/test/java/org/scribe/model/TokenTest.java at master · scusjs/scribe-java · GitHub
scusjs
/
scribe-java
Public
forked from
scribejava/scribejava
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
scribe-java
/
src
/
test
/
java
/
org
/
scribe
/
model
/
TokenTest.java
Copy path
More file actions
More file actions
Latest commit
History
History
History
44 lines (35 loc) · 1.08 KB
Breadcrumbs
scribe-java
/
src
/
test
/
java
/
org
/
scribe
/
model
/
TokenTest.java
Copy path
File metadata and controls
44 lines (35 loc) · 1.08 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
package
org
.
scribe
.
model
;
import
static
junit
.
framework
.
Assert
.*;
import
org
.
junit
.*;
public
class
TokenTest
{
@
Test
public
void
shouldTestEqualityBasedOnTokenAndSecret
()
throws
Exception
{
Token
expected
=
new
Token
(
"access"
,
"secret"
);
Token
actual
=
new
Token
(
"access"
,
"secret"
);
assertEquals
(
expected
,
actual
);
assertEquals
(
actual
,
actual
);
}
@
Test
public
void
shouldNotDependOnRawString
()
throws
Exception
{
Token
expected
=
new
Token
(
"access"
,
"secret"
,
"raw_string"
);
Token
actual
=
new
Token
(
"access"
,
"secret"
,
"different_raw_string"
);
assertEquals
(
expected
,
actual
);
}
@
Test
public
void
shouldReturnSameHashCodeForEqualObjects
()
throws
Exception
{
Token
expected
=
new
Token
(
"access"
,
"secret"
);
Token
actual
=
new
Token
(
"access"
,
"secret"
);
assertEquals
(
expected
.
hashCode
(),
actual
.
hashCode
());
}
@
Test
public
void
shouldNotBeEqualToNullOrOtherObjects
()
throws
Exception
{
Token
expected
=
new
Token
(
"access"
,
"secret"
,
"response"
);
assertNotSame
(
expected
,
null
);
assertNotSame
(
expected
,
new
Object
());
}
}
Back
|
FazBrowse Home
|
New Git URL