mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 09:25:43 +01:00
Update to JAX-RS 2.1 with resteasy 3.6.1 and jetty 9.4
This commit is contained in:
@@ -60,7 +60,7 @@ public class ConfigResourceTest {
|
||||
|
||||
@Test
|
||||
@SubjectAware(username = "readOnly")
|
||||
public void shouldGetGlobalConfig() throws URISyntaxException {
|
||||
public void shouldGetGlobalConfig() throws Exception {
|
||||
MockHttpRequest request = MockHttpRequest.get("/" + ConfigResource.CONFIG_PATH_V2);
|
||||
MockHttpResponse response = new MockHttpResponse();
|
||||
dispatcher.invoke(request, response);
|
||||
|
||||
@@ -86,7 +86,7 @@ public class GroupRootResourceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldGetGroup() throws URISyntaxException {
|
||||
public void shouldGetGroup() throws Exception {
|
||||
Group group = createDummyGroup();
|
||||
when(groupManager.get("admin")).thenReturn(group);
|
||||
|
||||
@@ -199,7 +199,7 @@ public class GroupRootResourceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldGetAll() throws URISyntaxException {
|
||||
public void shouldGetAll() throws Exception {
|
||||
MockHttpRequest request = MockHttpRequest.get("/" + GroupRootResource.GROUPS_PATH_V2);
|
||||
MockHttpResponse response = new MockHttpResponse();
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@ public class MeResourceTest {
|
||||
|
||||
@Test
|
||||
@SubjectAware(username = "trillian", password = "secret")
|
||||
public void shouldReturnCurrentlyAuthenticatedUser() throws URISyntaxException {
|
||||
public void shouldReturnCurrentlyAuthenticatedUser() throws Exception {
|
||||
MockHttpRequest request = MockHttpRequest.get("/" + MeResource.ME_PATH_V2);
|
||||
request.accept(VndMediaType.USER);
|
||||
MockHttpResponse response = new MockHttpResponse();
|
||||
|
||||
@@ -92,7 +92,7 @@ public class RepositoryRootResourceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldFindExistingRepository() throws URISyntaxException {
|
||||
public void shouldFindExistingRepository() throws Exception {
|
||||
mockRepository("space", "repo");
|
||||
|
||||
MockHttpRequest request = MockHttpRequest.get("/" + RepositoryRootResource.REPOSITORIES_PATH_V2 + "space/repo");
|
||||
@@ -105,7 +105,7 @@ public class RepositoryRootResourceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldMapProperties() throws URISyntaxException {
|
||||
public void shouldMapProperties() throws Exception {
|
||||
Repository repository = mockRepository("space", "repo");
|
||||
repository.setProperty("testKey", "testValue");
|
||||
|
||||
@@ -118,7 +118,7 @@ public class RepositoryRootResourceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldGetAll() throws URISyntaxException {
|
||||
public void shouldGetAll() throws Exception {
|
||||
PageResult<Repository> singletonPageResult = createSingletonPageResult(mockRepository("space", "repo"));
|
||||
when(repositoryManager.getPage(any(), eq(0), eq(10))).thenReturn(singletonPageResult);
|
||||
|
||||
|
||||
@@ -77,7 +77,7 @@ public class UserRootResourceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldCreateFullResponseForAdmin() throws URISyntaxException {
|
||||
public void shouldCreateFullResponseForAdmin() throws Exception {
|
||||
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2 + "Neo");
|
||||
MockHttpResponse response = new MockHttpResponse();
|
||||
|
||||
@@ -92,7 +92,7 @@ public class UserRootResourceTest {
|
||||
|
||||
@Test
|
||||
@SubjectAware(username = "unpriv")
|
||||
public void shouldCreateLimitedResponseForSimpleUser() throws URISyntaxException {
|
||||
public void shouldCreateLimitedResponseForSimpleUser() throws Exception {
|
||||
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2 + "Neo");
|
||||
MockHttpResponse response = new MockHttpResponse();
|
||||
|
||||
@@ -217,7 +217,7 @@ public class UserRootResourceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldCreatePageForOnePageOnly() throws URISyntaxException {
|
||||
public void shouldCreatePageForOnePageOnly() throws Exception {
|
||||
PageResult<User> singletonPageResult = createSingletonPageResult(1);
|
||||
when(userManager.getPage(any(), eq(0), eq(10))).thenReturn(singletonPageResult);
|
||||
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2);
|
||||
@@ -235,7 +235,7 @@ public class UserRootResourceTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void shouldCreatePageForMultiplePages() throws URISyntaxException {
|
||||
public void shouldCreatePageForMultiplePages() throws Exception {
|
||||
PageResult<User> singletonPageResult = createSingletonPageResult(3);
|
||||
when(userManager.getPage(any(), eq(1), eq(1))).thenReturn(singletonPageResult);
|
||||
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2 + "?page=1&pageSize=1");
|
||||
|
||||
Reference in New Issue
Block a user