From f477f8a9b23caa2bd46d536f4d3cbf0ac4367f26 Mon Sep 17 00:00:00 2001 From: Calvin Date: Mon, 8 Jul 2013 16:26:20 +0800 Subject: [PATCH] =?UTF-8?q?#236=20=E4=BD=BF=E7=94=A8travis-ci=20=E6=8C=81?= =?UTF-8?q?=E7=BB=AD=E9=9B=86=E6=88=90=EF=BC=8C=E5=A2=9E=E5=8A=A0smoke=20t?= =?UTF-8?q?est?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../examples/showcase/functional/rest/UserJaxRsFT.java | 4 +--- .../examples/showcase/functional/rest/UserRestFT.java | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/rest/UserJaxRsFT.java b/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/rest/UserJaxRsFT.java index 4d5f43e5..b1afb1f5 100644 --- a/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/rest/UserJaxRsFT.java +++ b/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/rest/UserJaxRsFT.java @@ -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"; diff --git a/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/rest/UserRestFT.java b/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/rest/UserRestFT.java index f5c69bfb..a62131f3 100644 --- a/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/rest/UserRestFT.java +++ b/examples/showcase/src/test/functional/org/springside/examples/showcase/functional/rest/UserRestFT.java @@ -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());