Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.7k
Nikola development Pull Request for merging my work into the master branch#1072
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
c422241
9aa0841
759e955
56f0a96
f389b08
e84040a
49d6ffe
ac025a4
22ff531
30ddaf0
8385a7b
99b6a14
d865301
0983313
c97456e
8fa3da5
0976235
3884fad
f959b03
322bdc7
95bd2b6
e4efa5c
3015c50
31761ff
de3bbe5
b7de5fe
d040a99
292d26f
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.java text eol=lf |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"java.configuration.updateBuildConfiguration": "automatic", | ||
"liveServer.settings.port": 5501 | ||
} |
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package com.github.scribejava.apis.facebook; | ||
import com.github.scribejava.core.model.Response; | ||
import java.io.IOException; | ||
import java.util.Collections; | ||
import static org.junit.Assert.*; | ||
import org.junit.Test; | ||
public class FacebookAccessTokenErrorResponseTest { | ||
@Test | ||
public void testEquals_Self() throws IOException { | ||
Response response = new Response(200, "OK", Collections.<String, String>emptyMap(), "Body content here"); | ||
FacebookAccessTokenErrorResponse errorResponse = new FacebookAccessTokenErrorResponse( | ||
"Message", "Type", 100, "TraceID", response); | ||
assertTrue("Should return true when comparing to itself.", | ||
errorResponse.equals(errorResponse)); | ||
} | ||
@Test | ||
public void testEquals_NullObject() throws IOException { | ||
Response response = new Response(200, "OK", Collections.<String, String>emptyMap(), "Body content here"); | ||
FacebookAccessTokenErrorResponse errorResponse = new FacebookAccessTokenErrorResponse( | ||
"Message", "Type", 100, "TraceID", response); | ||
assertFalse("Should return false when comparing to null.", | ||
errorResponse.equals(null)); | ||
} | ||
@Test | ||
public void testEquals_DifferentClass() throws IOException { | ||
Response response = new Response(200, "OK", Collections.<String, String>emptyMap(), "Body content here"); | ||
FacebookAccessTokenErrorResponse errorResponse = new FacebookAccessTokenErrorResponse( | ||
"Message", "Type", 100, "TraceID", response); | ||
Object otherObject = new Object(); | ||
assertFalse("Should return false when comparing different classes.", | ||
errorResponse.equals(otherObject)); | ||
} | ||
@Test | ||
public void testEquals_DifferentErrorMessage() throws IOException { | ||
Response response = new Response(200, "OK", Collections.<String, String>emptyMap(), "Body content here"); | ||
FacebookAccessTokenErrorResponse errorResponse1 = new FacebookAccessTokenErrorResponse( | ||
"Message1", "Type", 100, "TraceID", response); | ||
FacebookAccessTokenErrorResponse errorResponse2 = new FacebookAccessTokenErrorResponse( | ||
"Message2", "Type", 100, "TraceID", response); | ||
assertFalse("Should return false when errorMessages are different.", | ||
errorResponse1.equals(errorResponse2)); | ||
} | ||
@Test | ||
public void testEquals_DifferentType() throws IOException { | ||
Response response = new Response(200, "OK", Collections.<String, String>emptyMap(), "Body content here"); | ||
FacebookAccessTokenErrorResponse errorResponse1 = new FacebookAccessTokenErrorResponse( | ||
"Message", "Type1", 100, "TraceID", response); | ||
FacebookAccessTokenErrorResponse errorResponse2 = new FacebookAccessTokenErrorResponse( | ||
"Message", "Type2", 100, "TraceID", response); | ||
assertFalse("Should return false when types are different.", | ||
errorResponse1.equals(errorResponse2)); | ||
} | ||
@Test | ||
public void testEquals_DifferentCode() throws IOException { | ||
Response response = new Response(200, "OK", Collections.<String, String>emptyMap(), "Body content here"); | ||
FacebookAccessTokenErrorResponse errorResponse1 = new FacebookAccessTokenErrorResponse( | ||
"Message", "Type", 100, "TraceID", response); | ||
FacebookAccessTokenErrorResponse errorResponse2 = new FacebookAccessTokenErrorResponse( | ||
"Message", "Type", 101, "TraceID", response); | ||
assertFalse("Should return false when codes are different.", | ||
errorResponse1.equals(errorResponse2)); | ||
} | ||
@Test | ||
public void testEquals_DifferentFbtraceId() throws IOException { | ||
Response response = new Response(200, "OK", Collections.<String, String>emptyMap(), "Body content here"); | ||
FacebookAccessTokenErrorResponse errorResponse1 = new FacebookAccessTokenErrorResponse( | ||
"Message", "Type", 100, "TraceID1", response); | ||
FacebookAccessTokenErrorResponse errorResponse2 = new FacebookAccessTokenErrorResponse( | ||
"Message", "Type", 100, "TraceID2", response); | ||
assertFalse("Should return false when fbtraceIds are different.", | ||
errorResponse1.equals(errorResponse2)); | ||
} | ||
} |
Uh oh!
There was an error while loading.Please reload this page.