/*****************************************************************************
 ** Copyright (c) 2010 - 2012 Ushahidi Inc
 ** All rights reserved
 ** Contact: team@ushahidi.com
 ** Website: http://www.ushahidi.com
 **
 ** GNU Lesser General Public License Usage
 ** This file may be used under the terms of the GNU Lesser
 ** General Public License version 3 as published by the Free Software
 ** Foundation and appearing in the file LICENSE.LGPL included in the
 ** packaging of this file. Please review the following information to
 ** ensure the GNU Lesser General Public License version 3 requirements
 ** will be met: http://www.gnu.org/licenses/lgpl.html.
 **
 **
 ** If you have questions regarding the use of this file, please contact
 ** Ushahidi developers at team@ushahidi.com.
 **
 *****************************************************************************/
package com.crowdmap.java.sdk.service;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import com.crowdmap.java.sdk.json.CommentsJson;
import com.crowdmap.java.sdk.json.MapsJson;
import com.crowdmap.java.sdk.json.PostsJson;

/**
 * Posts Service Test case
 */
public class PostsServiceTest extends BaseServiceTest {

	private PostsService postsService;

	@Before
	public void setUp() throws Exception {
		super.setUp();
		postsService = new PostsService(client);
	}

	@After
	public void tearDown() throws Exception {
		super.tearDown();
		postsService = null;
	}

	/**
	 * Test method for
	 * {@link com.crowdmap.java.sdk.service.PostsService#getPosts()}.
	 */
	@Test
	public void testGetPosts() {

		PostsJson postsJson = postsService.getPosts();

		assertNotNull("Post cannot be null ", postsJson.posts);

	}

	@Test
	public void testGetPostMaps() {
		MapsJson mapsJson = postsService.getPostMaps(String.valueOf(1));
		assertNotNull("Maps cannot be null", mapsJson);
	}

	@Test
	public void testGetPostComments() {
		// TODO check for nulls
		CommentsJson commentsJson = postsService.getPostComments(String
				.valueOf(1));
	}

	@Test
	public void getPostComments() {
		// TODO check for nulls
		CommentsJson commentsJson = postsService.getPostComments(
				String.valueOf(1), String.valueOf(1));
	}

}

@@ -1701,24 +1701,125 @@
 osts);%0A%0A%09%7D%0A%0A
+%09/**%0A%09 * Test method for %0A%09 * %7B@link com.crowdmap.java.sdk.service.PostsService#getPostMaps()%7D.%0A%09 */%0A
 %09@Test%0A%09publ
@@ -1963,24 +1963,128 @@
 sJson);%0A%09%7D%0A%0A
+%09/**%0A%09 * Test method for%0A%09 * %7B@link com.crowdmap.java.sdk.service.PostsService#getPostComments()%7D.%0A%09 */%0A
 %09@Test%0A%09publ
@@ -2119,33 +2119,8 @@
 ) %7B%0A
-%09%09// TODO check for nulls
 %0A%09%09C
@@ -2201,18 +2201,181 @@
 f(1));%0A%09
-%7D%0A
+%09assertNotNull(%22Comments cannot be null%22, commentsJson);%0A%09%7D%0A%0A%09/**%0A%09 * Test method for %0A%09 * %7B@link com.crowdmap.java.sdk.service.PostsService#getPostComments()%7D.%0A%09 */
 %0A%09@Test%0A
@@ -2411,33 +2411,8 @@
 ) %7B%0A
-%09%09// TODO check for nulls
 %0A%09%09C
@@ -2511,14 +2511,72 @@
 Of(1));%0A
+%09%09assertNotNull(%22Comments cannot be null%22, commentsJson);%0A
 %09%7D%0A%0A%7D%0A

Add doc for test cases