Skip to content

Loading…

Dependency updates and build fix. #8

Merged
merged 1 commit into from

1 participant

@habuma
Spring member

No description provided.

Craig Walls Merged in changes from upstream, fixed compile errors from old depend…
…ency on spring-social-test, and updated dependencies.
da0d7a7
@habuma habuma merged commit 5e98677 into spring-projects:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 9, 2012
  1. Merged in changes from upstream, fixed compile errors from old depend…

    Craig Walls committed
    …ency on spring-social-test, and updated dependencies.
View
6 build.gradle
@@ -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']
View
21 ...ial-github/src/test/java/org/springframework/social/github/api/impl/GistTemplateTest.java
@@ -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;
@@ -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");
@@ -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());
}
@@ -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());
}
@@ -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));
@@ -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);
}
View
8 ...ial-github/src/test/java/org/springframework/social/github/api/impl/RepoTemplateTest.java
@@ -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");
@@ -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());
}
@@ -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());
@@ -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());
}
Something went wrong with that request. Please try again.