Remove MockitoJUnitRunner from JSON tests

Previously the JSON tests unnecessarily had MockitoJUnitRunner.

This commit removes MockitoJUnitRunner from the JSON tests.

Issue gh-3736
This commit is contained in:
Rob Winch 2016-09-02 10:59:28 -05:00
parent df613ed4cc
commit d4c48dd3e1
6 changed files with 5 additions and 20 deletions

View File

@ -28,8 +28,6 @@ import org.jasig.cas.client.validation.Assertion;
import org.jasig.cas.client.validation.AssertionImpl;
import org.json.JSONException;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import org.skyscreamer.jsonassert.JSONAssert;
import org.springframework.security.cas.authentication.CasAuthenticationToken;
@ -45,7 +43,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Jitendra Singh
* @since 4.2
*/
@RunWith(MockitoJUnitRunner.class)
public class CasAuthenticationTokenMixinTests {
private final String KEY = "casKey";

View File

@ -17,8 +17,6 @@
package org.springframework.security.jackson2;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.util.ObjectUtils;
@ -29,7 +27,6 @@ import java.util.Collections;
* @author Jitenra Singh
* @since 4.2
*/
@RunWith(MockitoJUnitRunner.class)
public abstract class AbstractMixinTests {
ObjectMapper mapper;

View File

@ -17,8 +17,7 @@
package org.springframework.security.web.jackson2;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.security.jackson2.SecurityJacksonModules;
import org.springframework.util.ObjectUtils;
@ -26,7 +25,6 @@ import org.springframework.util.ObjectUtils;
* @author Jitenra Singh
* @since 4.2
*/
@RunWith(MockitoJUnitRunner.class)
public abstract class AbstractMixinTests {
ObjectMapper mapper;

View File

@ -16,27 +16,25 @@
package org.springframework.security.web.jackson2;
import java.io.IOException;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.json.JSONException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import org.skyscreamer.jsonassert.JSONAssert;
import org.springframework.security.jackson2.SecurityJacksonModules;
import org.springframework.security.web.csrf.DefaultCsrfToken;
import java.io.IOException;
import static org.assertj.core.api.Assertions.assertThat;
/**
* @author Jitendra Singh
* @since 4.2
*/
@RunWith(MockitoJUnitRunner.class)
public class DefaultCsrfTokenMixinTests {
ObjectMapper objectMapper;

View File

@ -18,9 +18,8 @@ package org.springframework.security.web.jackson2;
import org.json.JSONException;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import org.skyscreamer.jsonassert.JSONAssert;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.security.web.PortResolverImpl;
import org.springframework.security.web.savedrequest.DefaultSavedRequest;
@ -37,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Jitendra Singh
* @since 4.2
*/
@RunWith(MockitoJUnitRunner.class)
public class DefaultSavedRequestMixinTests extends AbstractMixinTests {
String defaultSavedRequestJson = "{" +

View File

@ -23,8 +23,6 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import org.json.JSONException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import org.skyscreamer.jsonassert.JSONAssert;
import org.springframework.mock.web.MockHttpServletRequest;
@ -38,7 +36,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Jitendra Singh
* @since 4.2
*/
@RunWith(MockitoJUnitRunner.class)
public class WebAuthenticationDetailsMixinTests {
ObjectMapper mapper;