1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.atlassian.jira.rest.client.internal.json;
18
19 import com.atlassian.jira.rest.client.TestUtil;
20 import com.atlassian.jira.rest.client.domain.BasicProject;
21 import org.junit.Test;
22
23 import static org.junit.Assert.assertEquals;
24
25 public class BasicProjectJsonParserTest {
26 @Test
27 public void testParse() throws Exception {
28 BasicProjectJsonParser parser = new BasicProjectJsonParser();
29 final BasicProject project = parser.parse(ResourceUtil.getJsonObjectFromResource("/json/project/basic.json"));
30 assertEquals(TestUtil.toUri("http://localhost:8090/jira/rest/api/latest/project/RST"), project.getSelf());
31 assertEquals("RST", project.getKey());
32 }
33 }