Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Dependency updates and build fix. #8

Merged
merged 1 commit into from
Aug 9, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ configure(allprojects) {
targetCompatibility=1.5

springSocialVersion = '1.1.0.BUILD-SNAPSHOT'
jacksonVersion = '1.9.2'
jacksonVersion = '1.9.9'
junitVersion = '4.8.2'
mockitoVersion = '1.8.5'
springVersion = '3.1.0.RELEASE'
mockitoVersion = '1.9.0'
springVersion = '3.1.2.RELEASE'
springTestMvcVersion = "1.0.0.M1"

[compileJava, compileTestJava]*.options*.compilerArgs = ['-Xlint:none']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@
*/
package org.springframework.social.github.api.impl;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import static org.springframework.http.HttpMethod.GET;
import static org.springframework.social.test.client.RequestMatchers.method;
import static org.springframework.social.test.client.RequestMatchers.requestTo;
import static org.springframework.social.test.client.ResponseCreators.withResponse;
import static org.junit.Assert.*;
import static org.springframework.http.HttpMethod.*;
import static org.springframework.test.web.client.RequestMatchers.*;
import static org.springframework.test.web.client.ResponseCreators.*;

import java.util.List;

Expand All @@ -41,7 +38,7 @@ public void getUserGists() {
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
mockServer.expect(requestTo("https://api.github.com/users/kdonald/gists"))
.andExpect(method(GET))
.andRespond(withResponse(jsonResource("user-gists"), responseHeaders));
.andRespond(withSuccess(jsonResource("user-gists"), MediaType.APPLICATION_JSON));

// Verify the list
List<GitHubGist> gists = gitHub.gistOperations().getUserGists("kdonald");
Expand Down Expand Up @@ -72,7 +69,7 @@ public void getGists_Anonymous() {
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
mockServer.expect(requestTo("https://api.github.com/gists"))
.andExpect(method(GET))
.andRespond(withResponse(jsonResource("gists-public"), responseHeaders));
.andRespond(withSuccess(jsonResource("gists-public"), MediaType.APPLICATION_JSON));
List<GitHubGist> gists = gitHub.gistOperations().getGists();
assertEquals(30, gists.size());
}
Expand All @@ -87,7 +84,7 @@ public void getPublicGists() {
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
mockServer.expect(requestTo("https://api.github.com/gists/public"))
.andExpect(method(GET))
.andRespond(withResponse(jsonResource("gists-public"), responseHeaders));
.andRespond(withSuccess(jsonResource("gists-public"), MediaType.APPLICATION_JSON));
List<GitHubGist> gists = gitHub.gistOperations().getPublicGists();
assertEquals(30, gists.size());
}
Expand All @@ -107,7 +104,7 @@ public void getGistComments() {
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
mockServer.expect(requestTo("https://api.github.com/gists/1651139/comments"))
.andExpect(method(GET))
.andRespond(withResponse(jsonResource("gist-comments"), responseHeaders));
.andRespond(withSuccess(jsonResource("gist-comments"), MediaType.APPLICATION_JSON));
List<GitHubComment> comments = gitHub.gistOperations().getGistComments("1651139");
assertEquals(2, comments.size());
verifyComment(comments.get(0));
Expand All @@ -118,7 +115,7 @@ public void getGistComment() {
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
mockServer.expect(requestTo("https://api.github.com/gists/comments/77557"))
.andExpect(method(GET))
.andRespond(withResponse(jsonResource("gist-comment"), responseHeaders));
.andRespond(withSuccess(jsonResource("gist-comment"), MediaType.APPLICATION_JSON));
GitHubComment comment = gitHub.gistOperations().getGistComment(77557L);
verifyComment(comment);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void getRepo() {
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
mockServer.expect(requestTo("https://api.github.com/repos/williewheeler/skybase"))
.andExpect(method(GET))
.andRespond(withResponse(jsonResource("repo"), responseHeaders));
.andRespond(withSuccess(jsonResource("repo"), MediaType.APPLICATION_JSON));

GitHubRepo repo = gitHub.repoOperations().getRepo("williewheeler", "skybase");

Expand Down Expand Up @@ -74,7 +74,7 @@ public void getDownloads() {
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
mockServer.expect(requestTo("https://api.github.com/repos/williewheeler/skybase/downloads"))
.andExpect(method(GET))
.andRespond(withResponse(jsonResource("repo-downloads"), responseHeaders));
.andRespond(withSuccess(jsonResource("repo-downloads"), MediaType.APPLICATION_JSON));
assertEquals(4, gitHub.repoOperations().getDownloads("williewheeler", "skybase").size());
}

Expand All @@ -83,7 +83,7 @@ public void getDownload() {
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
mockServer.expect(requestTo("https://api.github.com/repos/williewheeler/skybase/downloads/201817"))
.andExpect(method(GET))
.andRespond(withResponse(jsonResource("repo-download"), responseHeaders));
.andRespond(withSuccess(jsonResource("repo-download"), MediaType.APPLICATION_JSON));

GitHubDownload download = gitHub.repoOperations().getDownload("williewheeler", "skybase", 201817L);
assertEquals("disconnected.png", download.getName());
Expand All @@ -95,7 +95,7 @@ public void getForks() {
responseHeaders.setContentType(MediaType.APPLICATION_JSON);
mockServer.expect(requestTo("https://api.github.com/repos/williewheeler/skybase/forks"))
.andExpect(method(GET))
.andRespond(withResponse(jsonResource("repo-forks"), responseHeaders));
.andRespond(withSuccess(jsonResource("repo-forks"), MediaType.APPLICATION_JSON));
assertEquals(4, gitHub.repoOperations().getForks("williewheeler", "skybase").size());
}

Expand Down