Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #61 from habuma/master

SOCIALFB-103: Add 'about' property to Page object.
  • Loading branch information...
commit 14741afde0f4be0edff62afe953019b17a490ad8 2 parents 521bc1d + ac53814
@habuma habuma authored
View
2  build.gradle
@@ -19,6 +19,7 @@ configure(allprojects) {
ext {
springSocialVersion = '1.1.0.BUILD-SNAPSHOT'
+ hamcrestVersion = '1.3'
jacksonVersion = '1.9.9'
jspApiVersion = '2.1'
junitVersion = '4.10'
@@ -40,6 +41,7 @@ configure(allprojects) {
}
dependencies {
+ testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion"
testCompile "junit:junit-dep:$junitVersion"
testCompile "org.mockito:mockito-all:$mockitoVersion"
testCompile "org.springframework:spring-test:$springVersion"
View
6 spring-social-facebook/src/main/java/org/springframework/social/facebook/api/Page.java
@@ -34,6 +34,8 @@
private String description;
+ private String about;
+
private Location location;
private String website;
@@ -79,6 +81,10 @@ public String getDescription() {
return description;
}
+ public String getAbout() {
+ return about;
+ }
+
public Location getLocation() {
return location;
}
View
3  spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/PageMixin.java
@@ -38,6 +38,9 @@
@JsonProperty("description")
String description;
+ @JsonProperty("about")
+ String about;
+
@JsonProperty("location")
Location location;
View
2  spring-social-facebook/src/test/java/org/springframework/social/facebook/api/PageTemplateTest.java
@@ -49,6 +49,7 @@ public void getPage_organization() {
assertEquals(33, page.getLikes());
assertEquals("Organization", page.getCategory());
assertEquals("<p><b>SpringSource</b> is a division of <a href=\"http://en.wikipedia.org/wiki/VMware\" class=\"wikipedia\">VMware</a> that provides...</p>", page.getDescription());
+ assertEquals("SpringSource offers a product suite to build, run & manage enterprise Java applications. Please join the SpringSource Group here: http://www.facebook.com/groups/10463298884/", page.getAbout());
}
@Test
@@ -67,6 +68,7 @@ public void getPage_product() {
assertEquals(5083988, page.getLikes());
assertEquals("Food/beverages", page.getCategory());
assertEquals("www.mountaindew.com\nwww.greenlabelsound.com\nwww.greenlabelart.com\nwww.honorthecode.com\nwww.dietdewchallenge.com\nwww.twitter.com/mtn_dew\nwww.youtube.com/mountaindew", page.getWebsite());
+ assertEquals("This is How We DEW", page.getAbout());
}
@Test
View
3  ...cial-facebook/src/test/resources/org/springframework/social/facebook/api/testdata/organization-page.json
@@ -6,5 +6,6 @@
"category": "Organization",
"likes": 33,
"is_community_page": true,
- "description": "\u003cp>\u003cb>SpringSource\u003c/b> is a division of \u003ca href=\"http://en.wikipedia.org/wiki/VMware\" class=\"wikipedia\">VMware\u003c/a> that provides...\u003c/p>"
+ "description": "\u003cp>\u003cb>SpringSource\u003c/b> is a division of \u003ca href=\"http://en.wikipedia.org/wiki/VMware\" class=\"wikipedia\">VMware\u003c/a> that provides...\u003c/p>",
+ "about": "SpringSource offers a product suite to build, run & manage enterprise Java applications. Please join the SpringSource Group here: http://www.facebook.com/groups/10463298884/"
}
View
3  ...ng-social-facebook/src/test/resources/org/springframework/social/facebook/api/testdata/product-page.json
@@ -8,5 +8,6 @@
"website": "www.mountaindew.com\nwww.greenlabelsound.com\nwww.greenlabelart.com\nwww.honorthecode.com\nwww.dietdewchallenge.com\nwww.twitter.com/mtn_dew\nwww.youtube.com/mountaindew",
"username": "mountaindew",
"mission": "Join The Official Mountain Dew Facebook page for a \u201cpeek under the cap\u201d at the latest and greatest from DEW.\n",
- "products": "Mountain Dew, Diet Mountain Dew, Mountain Dew Voltage, Mountain Dew White Out, Mountain Dew Code Red, Diet Mountain Dew Code Red, Mountain Dew LiveWire, BajaBlast"
+ "products": "Mountain Dew, Diet Mountain Dew, Mountain Dew Voltage, Mountain Dew White Out, Mountain Dew Code Red, Diet Mountain Dew Code Red, Mountain Dew LiveWire, BajaBlast",
+ "about": "This is How We DEW"
}
Please sign in to comment.
Something went wrong with that request. Please try again.