#236 使用travis-ci 持续集成,增加smoke test

This commit is contained in:
Calvin
2013-07-08 16:26:20 +08:00
parent 26675928a9
commit f477f8a9b2
2 changed files with 4 additions and 3 deletions
@@ -16,11 +16,9 @@ import org.springside.examples.showcase.webservice.rest.UserDTO;
public class UserJaxRsFT extends BaseFunctionalTestCase {
private static String resoureUrl;
private RestTemplate restTemplate = new RestTemplate();
@BeforeClass
public static void initUrl() {
resoureUrl = baseUrl + "/cxf/jaxrs/user";
@@ -8,6 +8,7 @@ import org.junit.After;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
@@ -22,6 +23,7 @@ import org.springframework.web.client.HttpClientErrorException;
import org.springframework.web.client.RestTemplate;
import org.springside.examples.showcase.functional.BaseFunctionalTestCase;
import org.springside.examples.showcase.webservice.rest.UserDTO;
import org.springside.modules.test.category.Smoke;
import org.springside.modules.web.Servlets;
import com.google.common.collect.Lists;
@@ -104,6 +106,7 @@ public class UserRestFT extends BaseFunctionalTestCase {
* 演示使用Apache Http client4.
*/
@Test
@Category(Smoke.class)
public void getUserAsJson() {
UserDTO user = httpClientRestTemplate.getForObject(resoureUrl + "/{id}.json", UserDTO.class, 1L);
assertEquals("admin", user.getLoginName());