package jp.agentec.abook.abv.bl.acms.client.json;

import static org.junit.Assert.assertTrue;
import jp.agentec.abook.abv.bl.dto.ContentDto;

import org.junit.Test;

public class ContentVersionsJSONTest {

	@Test
	public void testContentVersionsJSON() {
		String jsonString = "{\"httpStatus\":200,\"contentList\":[{\"contentId\":352,\"metaVersion\":10,\"resourceVersion\":6},{\"contentId\":355,\"metaVersion\":9,\"resourceVersion\":6},{\"contentId\":353,\"metaVersion\":7,\"resourceVersion\":5},{\"contentId\":354,\"metaVersion\":11,\"resourceVersion\":9},{\"contentId\":356,\"metaVersion\":10,\"resourceVersion\":8},{\"contentId\":369,\"metaVersion\":2,\"resourceVersion\":2},{\"contentId\":370,\"metaVersion\":1,\"resourceVersion\":1},{\"contentId\":371,\"metaVersion\":2,\"resourceVersion\":2},{\"contentId\":377,\"metaVersion\":2,\"resourceVersion\":2},{\"contentId\":379,\"metaVersion\":3,\"resourceVersion\":2},{\"contentId\":374,\"metaVersion\":1,\"resourceVersion\":1},{\"contentId\":375,\"metaVersion\":1,\"resourceVersion\":1},{\"contentId\":376,\"metaVersion\":1,\"resourceVersion\":1},{\"contentId\":381,\"metaVersion\":3,\"resourceVersion\":2},{\"contentId\":382,\"metaVersion\":3,\"resourceVersion\":2},{\"contentId\":390,\"metaVersion\":20,\"resourceVersion\":38},{\"contentId\":404,\"metaVersion\":7,\"resourceVersion\":8},{\"contentId\":405,\"metaVersion\":11,\"resourceVersion\":15},{\"contentId\":418,\"metaVersion\":21,\"resourceVersion\":17},{\"contentId\":411,\"metaVersion\":8,\"resourceVersion\":9},{\"contentId\":413,\"metaVersion\":12,\"resourceVersion\":12},{\"contentId\":408,\"metaVersion\":4,\"resourceVersion\":4},{\"contentId\":409,\"metaVersion\":3,\"resourceVersion\":5},{\"contentId\":410,\"metaVersion\":10,\"resourceVersion\":13},{\"contentId\":403,\"metaVersion\":6,\"resourceVersion\":4},{\"contentId\":445,\"metaVersion\":7,\"resourceVersion\":7},{\"contentId\":446,\"metaVersion\":4,\"resourceVersion\":4},{\"contentId\":450,\"metaVersion\":4,\"resourceVersion\":4},{\"contentId\":447,\"metaVersion\":4,\"resourceVersion\":4},{\"contentId\":449,\"metaVersion\":3,\"resourceVersion\":3},{\"contentId\":448,\"metaVersion\":5,\"resourceVersion\":5},{\"contentId\":451,\"metaVersion\":2,\"resourceVersion\":3}]}";
		try {
			ContentVersionsJSON json = new ContentVersionsJSON(jsonString);
			for (ContentDto contentDto : json.contentVersions) {
				System.out.println(contentDto);
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		assertTrue(true);
	}

}
