Renamed tests

This commit is contained in:
Philipp Czora
2018-08-08 15:14:39 +02:00
parent 499be7314e
commit 390ba29bee
7 changed files with 16 additions and 20 deletions

View File

@@ -23,9 +23,7 @@ import javax.inject.Provider;
import javax.servlet.http.HttpServletResponse;
import java.net.URISyntaxException;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.*;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
@@ -77,7 +75,7 @@ public class HgConfigAutoConfigurationResourceTest {
@Test
@SubjectAware(username = "readOnly")
public void shouldSetDefaultConfigAndInstallHgOnlyWhenAuthorized() throws Exception {
public void shouldNotSetDefaultConfigAndInstallHgWhenNotAuthorized() throws Exception {
thrown.expectMessage("Subject does not have permission [configuration:write:hg]");
put(null);
@@ -96,7 +94,7 @@ public class HgConfigAutoConfigurationResourceTest {
@Test
@SubjectAware(username = "readOnly")
public void shouldUpdateConfigAndInstallHgOnlyWhenAuthorized() throws Exception {
public void shouldNotUpdateConfigAndInstallHgWhenNotAuthorized() throws Exception {
thrown.expectMessage("Subject does not have permission [configuration:write:hg]");
put("{\"disabled\":true}");

View File

@@ -81,7 +81,7 @@ public class HgConfigInstallationsResourceTest {
@Test
@SubjectAware(username = "writeOnly")
public void shouldGetHgInstallationsOnlyWhenAuthorized() throws Exception {
public void shouldNotGetHgInstallationsWhenNotAuthorized() throws Exception {
thrown.expectMessage("Subject does not have permission [configuration:read:hg]");
get("hg");
@@ -103,7 +103,7 @@ public class HgConfigInstallationsResourceTest {
@Test
@SubjectAware(username = "writeOnly")
public void shouldGetPythonInstallationsOnlyWhenAuthorized() throws Exception {
public void shouldNotGetPythonInstallationsWhenNotAuthorized() throws Exception {
thrown.expectMessage("Subject does not have permission [configuration:read:hg]");
get("python");

View File

@@ -112,7 +112,7 @@ public class HgConfigPackageResourceTest {
@Test
@SubjectAware(username = "writeOnly")
public void shouldGetPackagesOnlyWhenAuthorized() throws Exception {
public void shouldNotGetPackagesWhenNotAuthorized() throws Exception {
thrown.expectMessage("Subject does not have permission [configuration:read:hg]");
get();
@@ -157,7 +157,7 @@ public class HgConfigPackageResourceTest {
@Test
@SubjectAware(username = "readOnly")
public void shouldInstallPackageOnlyWhenAuthorized() throws Exception {
public void shouldNotInstallPackageWhenNotAuthorized() throws Exception {
thrown.expectMessage("Subject does not have permission [configuration:write:hg]");
put("don-t-care");

View File

@@ -121,7 +121,7 @@ public class HgConfigResourceTest {
@Test
@SubjectAware(username = "writeOnly")
public void shouldGetConfigOnlyWhenAuthorized() throws URISyntaxException {
public void shouldNotGetConfigWhenNotAuthorized() throws URISyntaxException {
thrown.expectMessage("Subject does not have permission [configuration:read:hg]");
get();
@@ -136,7 +136,7 @@ public class HgConfigResourceTest {
@Test
@SubjectAware(username = "readOnly")
public void shouldUpdateConfigOnlyWhenAuthorized() throws URISyntaxException {
public void shouldNotUpdateConfigWhenNotAuthorized() throws URISyntaxException {
thrown.expectMessage("Subject does not have permission [configuration:write:hg]");
put();