knox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject knox git commit: KNOX-1018 - Remove junit.framework calls
Date Fri, 01 Sep 2017 09:08:36 GMT
Repository: knox
Updated Branches:
  refs/heads/master f1bbea9b7 -> 202b3dc8b


KNOX-1018 - Remove junit.framework calls


Project: http://git-wip-us.apache.org/repos/asf/knox/repo
Commit: http://git-wip-us.apache.org/repos/asf/knox/commit/202b3dc8
Tree: http://git-wip-us.apache.org/repos/asf/knox/tree/202b3dc8
Diff: http://git-wip-us.apache.org/repos/asf/knox/diff/202b3dc8

Branch: refs/heads/master
Commit: 202b3dc8b8d955336689ce5c20860d5a69482dd2
Parents: f1bbea9
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Sep 1 10:07:44 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Sep 1 10:07:44 2017 +0100

----------------------------------------------------------------------
 .../apache/hadoop/gateway/provider/federation/JWTTokenTest.java  | 3 +--
 .../org/apache/hadoop/gateway/picketlink/PicketlinkTest.java     | 3 +--
 .../hadoop/gateway/provider/federation/DefaultValidatorTest.java | 3 +--
 .../provider/federation/HeaderPreAuthFederationFilterTest.java   | 3 +--
 .../hadoop/gateway/provider/federation/IPValidatorTest.java      | 3 +--
 .../hadoop/gateway/provider/federation/PreAuthSSOTest.java       | 3 +--
 .../hadoop/gateway/provider/federation/PreAuthServiceTest.java   | 3 +--
 .../test/java/org/apache/hadoop/gateway/webappsec/CSRFTest.java  | 3 +--
 .../apache/hadoop/gateway/filter/CompositeEnumerationTest.java   | 2 +-
 .../org/apache/hadoop/gateway/deploy/DeploymentFactoryTest.java  | 2 +-
 .../org/apache/hadoop/gateway/util/IpAddressValidatorTest.java   | 3 +--
 .../test/java/org/apache/hadoop/gateway/util/JsonUtilsTest.java  | 3 +--
 .../src/test/java/org/apache/hadoop/gateway/util/UrlsTest.java   | 4 ++--
 .../config/impl/BeanConfigurationAdapterDescriptorTest.java      | 2 +-
 .../org/apache/hadoop/gateway/util/urltemplate/ExpanderTest.java | 2 +-
 15 files changed, 16 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-provider-security-jwt/src/test/java/org/apache/hadoop/gateway/provider/federation/JWTTokenTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-jwt/src/test/java/org/apache/hadoop/gateway/provider/federation/JWTTokenTest.java
b/gateway-provider-security-jwt/src/test/java/org/apache/hadoop/gateway/provider/federation/JWTTokenTest.java
index 8d8bcab..2830a9c 100644
--- a/gateway-provider-security-jwt/src/test/java/org/apache/hadoop/gateway/provider/federation/JWTTokenTest.java
+++ b/gateway-provider-security-jwt/src/test/java/org/apache/hadoop/gateway/provider/federation/JWTTokenTest.java
@@ -18,12 +18,11 @@
 package org.apache.hadoop.gateway.provider.federation;
 
 import java.util.ArrayList;
-import junit.framework.TestCase;
 
 import org.apache.hadoop.gateway.services.security.token.impl.JWTToken;
 import org.junit.Test;
 
-public class JWTTokenTest extends TestCase {
+public class JWTTokenTest extends org.junit.Assert {
   private static final String JWT_TOKEN = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE0MTY5MjkxMDksImp0aSI6ImFhN2Y4ZDBhOTVjIiwic2NvcGVzIjpbInJlcG8iLCJwdWJsaWNfcmVwbyJdfQ.XCEwpBGvOLma4TCoh36FU7XhUbcskygS81HE1uHLf0E";
   private static final String HEADER = "{\"alg\":\"RS256\", \"type\":\"JWT\"}";
   private static final String CLAIMS = "{\"iss\": \"gateway\", \"prn\": \"john.doe@example.com\",
\"aud\": \"https://login.example.com\", \"exp\": \"1363360913\"}";

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-provider-security-picketlink/src/test/java/org/apache/hadoop/gateway/picketlink/PicketlinkTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-picketlink/src/test/java/org/apache/hadoop/gateway/picketlink/PicketlinkTest.java
b/gateway-provider-security-picketlink/src/test/java/org/apache/hadoop/gateway/picketlink/PicketlinkTest.java
index 4ef3088..0631eeb 100644
--- a/gateway-provider-security-picketlink/src/test/java/org/apache/hadoop/gateway/picketlink/PicketlinkTest.java
+++ b/gateway-provider-security-picketlink/src/test/java/org/apache/hadoop/gateway/picketlink/PicketlinkTest.java
@@ -18,12 +18,11 @@
  */
 package org.apache.hadoop.gateway.picketlink;
 
-import junit.framework.TestCase;
 
 import org.apache.hadoop.gateway.services.security.token.impl.JWTToken;
 import org.junit.Test;
 
-public class PicketlinkTest extends TestCase {
+public class PicketlinkTest extends org.junit.Assert {
   @Test
   public void testPicketlink() throws Exception {
     assertTrue(true);

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/DefaultValidatorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/DefaultValidatorTest.java
b/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/DefaultValidatorTest.java
index 4096b48..08dcd14 100644
--- a/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/DefaultValidatorTest.java
+++ b/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/DefaultValidatorTest.java
@@ -17,7 +17,6 @@
  */
 package org.apache.hadoop.gateway.provider.federation;
 
-import junit.framework.TestCase;
 import org.apache.hadoop.gateway.preauth.filter.DefaultValidator;
 import org.junit.Test;
 
@@ -26,7 +25,7 @@ import static org.mockito.Mockito.mock;
 import javax.servlet.FilterConfig;
 import javax.servlet.http.HttpServletRequest;
 
-public class DefaultValidatorTest extends TestCase {
+public class DefaultValidatorTest extends org.junit.Assert {
   @Test
   public void testDefault() throws Exception {
     final FilterConfig filterConfig = mock(FilterConfig.class);

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/HeaderPreAuthFederationFilterTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/HeaderPreAuthFederationFilterTest.java
b/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/HeaderPreAuthFederationFilterTest.java
index 365ec45..6d1653c 100644
--- a/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/HeaderPreAuthFederationFilterTest.java
+++ b/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/HeaderPreAuthFederationFilterTest.java
@@ -17,7 +17,6 @@
  */
 package org.apache.hadoop.gateway.provider.federation;
 
-import junit.framework.TestCase;
 import org.apache.hadoop.gateway.preauth.filter.*;
 import org.junit.Test;
 
@@ -30,7 +29,7 @@ import java.util.List;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-public class HeaderPreAuthFederationFilterTest extends TestCase {
+public class HeaderPreAuthFederationFilterTest extends org.junit.Assert {
 
   @Test
   public void testDefaultValidator() throws ServletException, PreAuthValidationException
{

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/IPValidatorTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/IPValidatorTest.java
b/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/IPValidatorTest.java
index 23c0096..f83c210 100644
--- a/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/IPValidatorTest.java
+++ b/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/IPValidatorTest.java
@@ -17,7 +17,6 @@
  */
 package org.apache.hadoop.gateway.provider.federation;
 
-import junit.framework.TestCase;
 import org.apache.hadoop.gateway.preauth.filter.IPValidator;
 import org.apache.hadoop.gateway.preauth.filter.PreAuthValidationException;
 import org.junit.Test;
@@ -28,7 +27,7 @@ import javax.servlet.http.HttpServletRequest;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-public class IPValidatorTest extends TestCase {
+public class IPValidatorTest extends org.junit.Assert {
 
   @Test
   public void testName() {

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/PreAuthSSOTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/PreAuthSSOTest.java
b/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/PreAuthSSOTest.java
index ec57043..12d2df4 100644
--- a/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/PreAuthSSOTest.java
+++ b/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/PreAuthSSOTest.java
@@ -18,12 +18,11 @@
  */
 package org.apache.hadoop.gateway.provider.federation;
 
-import junit.framework.TestCase;
 
 import org.apache.hadoop.gateway.services.security.token.impl.JWTToken;
 import org.junit.Test;
 
-public class PreAuthSSOTest extends TestCase {
+public class PreAuthSSOTest extends org.junit.Assert {
   @Test
   public void testPreAuth() throws Exception {
     assertTrue(true);

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/PreAuthServiceTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/PreAuthServiceTest.java
b/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/PreAuthServiceTest.java
index 0332a6c..939b87f 100644
--- a/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/PreAuthServiceTest.java
+++ b/gateway-provider-security-preauth/src/test/java/org/apache/hadoop/gateway/provider/federation/PreAuthServiceTest.java
@@ -17,7 +17,6 @@
  */
 package org.apache.hadoop.gateway.provider.federation;
 
-import junit.framework.TestCase;
 import org.apache.hadoop.gateway.preauth.filter.*;
 import org.junit.Test;
 
@@ -31,7 +30,7 @@ import java.util.Map;
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
-public class PreAuthServiceTest extends TestCase {
+public class PreAuthServiceTest extends org.junit.Assert {
 
   @Test
   public void testValidatorMap() {

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-provider-security-webappsec/src/test/java/org/apache/hadoop/gateway/webappsec/CSRFTest.java
----------------------------------------------------------------------
diff --git a/gateway-provider-security-webappsec/src/test/java/org/apache/hadoop/gateway/webappsec/CSRFTest.java
b/gateway-provider-security-webappsec/src/test/java/org/apache/hadoop/gateway/webappsec/CSRFTest.java
index baab4b2..8e0fa27 100644
--- a/gateway-provider-security-webappsec/src/test/java/org/apache/hadoop/gateway/webappsec/CSRFTest.java
+++ b/gateway-provider-security-webappsec/src/test/java/org/apache/hadoop/gateway/webappsec/CSRFTest.java
@@ -17,11 +17,10 @@
  */
 package org.apache.hadoop.gateway.webappsec;
 
-import junit.framework.TestCase;
 
 import org.junit.Test;
 
-public class CSRFTest extends TestCase {
+public class CSRFTest extends org.junit.Assert {
   @Test
   public void testCsrf() throws Exception {
     assertTrue(true);

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-server-xforwarded-filter/src/test/java/org/apache/hadoop/gateway/filter/CompositeEnumerationTest.java
----------------------------------------------------------------------
diff --git a/gateway-server-xforwarded-filter/src/test/java/org/apache/hadoop/gateway/filter/CompositeEnumerationTest.java
b/gateway-server-xforwarded-filter/src/test/java/org/apache/hadoop/gateway/filter/CompositeEnumerationTest.java
index 93029dd..673305c 100644
--- a/gateway-server-xforwarded-filter/src/test/java/org/apache/hadoop/gateway/filter/CompositeEnumerationTest.java
+++ b/gateway-server-xforwarded-filter/src/test/java/org/apache/hadoop/gateway/filter/CompositeEnumerationTest.java
@@ -24,9 +24,9 @@ import java.util.Collections;
 import java.util.Enumeration;
 import java.util.NoSuchElementException;
 
-import static junit.framework.TestCase.fail;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
 
 public class CompositeEnumerationTest {
 

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-server/src/test/java/org/apache/hadoop/gateway/deploy/DeploymentFactoryTest.java
----------------------------------------------------------------------
diff --git a/gateway-server/src/test/java/org/apache/hadoop/gateway/deploy/DeploymentFactoryTest.java
b/gateway-server/src/test/java/org/apache/hadoop/gateway/deploy/DeploymentFactoryTest.java
index da804f3..60d7882 100644
--- a/gateway-server/src/test/java/org/apache/hadoop/gateway/deploy/DeploymentFactoryTest.java
+++ b/gateway-server/src/test/java/org/apache/hadoop/gateway/deploy/DeploymentFactoryTest.java
@@ -33,10 +33,10 @@ import org.junit.Test;
 import org.w3c.dom.Document;
 import org.xml.sax.SAXException;
 
-import static junit.framework.TestCase.fail;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.hamcrest.xml.HasXPath.hasXPath;
+import static org.junit.Assert.fail;
 
 public class DeploymentFactoryTest {
 

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/IpAddressValidatorTest.java
----------------------------------------------------------------------
diff --git a/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/IpAddressValidatorTest.java
b/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/IpAddressValidatorTest.java
index ff34dec..e0c0b5c 100644
--- a/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/IpAddressValidatorTest.java
+++ b/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/IpAddressValidatorTest.java
@@ -19,9 +19,8 @@ package org.apache.hadoop.gateway.util;
 
 import org.junit.Test;
 
-import junit.framework.TestCase;
 
-public class IpAddressValidatorTest extends TestCase {
+public class IpAddressValidatorTest extends org.junit.Assert {
   String test = "127.0.0.1,193.*,192.168.1.*,0:0:0:0:0:0:0:1,0:0:0:0:0:0:*";
   String testWeirdConfig = ",127.0.0.1,,193.*,192.168.1.*,29*";
   String testNullConfig = null;

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/JsonUtilsTest.java
----------------------------------------------------------------------
diff --git a/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/JsonUtilsTest.java
b/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/JsonUtilsTest.java
index 00776e2..29748f2 100644
--- a/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/JsonUtilsTest.java
+++ b/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/JsonUtilsTest.java
@@ -21,12 +21,11 @@ import java.util.HashMap;
 
 import org.junit.Test;
 
-import junit.framework.TestCase;
 
 import static org.hamcrest.CoreMatchers.containsString;
 import static org.hamcrest.MatcherAssert.assertThat;
 
-public class JsonUtilsTest extends TestCase {
+public class JsonUtilsTest extends org.junit.Assert {
   String expiresIn = "\"expires_in\":\"1364487943100\"";
   String tokenType = "\"token_type\":\"Bearer\"";
   String accessToken = "\"access_token\":\"ksdfh3489tyiodhfjk\"";

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/UrlsTest.java
----------------------------------------------------------------------
diff --git a/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/UrlsTest.java
b/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/UrlsTest.java
index 7c14ef8..6367bbd 100644
--- a/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/UrlsTest.java
+++ b/gateway-util-common/src/test/java/org/apache/hadoop/gateway/util/UrlsTest.java
@@ -17,11 +17,11 @@
  */
 package org.apache.hadoop.gateway.util;
 
+import static org.junit.Assert.assertEquals;
+
 import org.junit.Assert;
 import org.junit.Test;
 
-import static junit.framework.TestCase.assertEquals;
-
 public class UrlsTest {
 
   /**

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-util-configinjector/src/test/java/org/apache/hadoop/gateway/config/impl/BeanConfigurationAdapterDescriptorTest.java
----------------------------------------------------------------------
diff --git a/gateway-util-configinjector/src/test/java/org/apache/hadoop/gateway/config/impl/BeanConfigurationAdapterDescriptorTest.java
b/gateway-util-configinjector/src/test/java/org/apache/hadoop/gateway/config/impl/BeanConfigurationAdapterDescriptorTest.java
index 80913e2..6674951 100755
--- a/gateway-util-configinjector/src/test/java/org/apache/hadoop/gateway/config/impl/BeanConfigurationAdapterDescriptorTest.java
+++ b/gateway-util-configinjector/src/test/java/org/apache/hadoop/gateway/config/impl/BeanConfigurationAdapterDescriptorTest.java
@@ -25,9 +25,9 @@ import java.util.Iterator;
 import java.util.Map;
 import java.util.ServiceLoader;
 
-import static junit.framework.TestCase.fail;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.hasKey;
+import static org.junit.Assert.fail;
 
 public class BeanConfigurationAdapterDescriptorTest {
 

http://git-wip-us.apache.org/repos/asf/knox/blob/202b3dc8/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/ExpanderTest.java
----------------------------------------------------------------------
diff --git a/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/ExpanderTest.java
b/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/ExpanderTest.java
index 7fd3383..63bd80f 100644
--- a/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/ExpanderTest.java
+++ b/gateway-util-urltemplate/src/test/java/org/apache/hadoop/gateway/util/urltemplate/ExpanderTest.java
@@ -27,10 +27,10 @@ import java.net.URISyntaxException;
 import java.util.Arrays;
 import java.util.List;
 
-import static junit.framework.TestCase.assertNotNull;
 import static org.hamcrest.CoreMatchers.*;
 import static org.hamcrest.Matchers.containsString;
 import static org.hamcrest.Matchers.equalToIgnoringCase;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.fail;
 


Mime
View raw message