You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by co...@apache.org on 2018/11/27 09:42:59 UTC
svn commit: r1847523 [1/2] - in /webservices/wss4j/trunk:
integration/src/test/java/org/apache/wss4j/integration/test/kerberos/
policy/src/test/java/org/apache/wss4j/policy/tests/
ws-security-common/src/test/java/org/apache/wss4j/common/crypto/ ws-secu...
Author: coheigea
Date: Tue Nov 27 09:42:58 2018
New Revision: 1847523
URL: http://svn.apache.org/viewvc?rev=1847523&view=rev
Log:
Simplify junit expressions
Modified:
webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java
webservices/wss4j/trunk/policy/src/test/java/org/apache/wss4j/policy/tests/SamlTokenTest.java
webservices/wss4j/trunk/ws-security-common/src/test/java/org/apache/wss4j/common/crypto/NameConstraintsTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CertificateStoreTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CryptoTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/WSSConfigTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomTokenTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureConfirmationTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedDataInHeaderTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionPartsTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SecurityContextTokenTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCRLTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCertTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureKeyValueTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignaturePartsTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/TimestampTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UsernameTokenTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/BSTKerberosTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/misc/PrincipalTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java
webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationConverterTest.java
webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/PrincipalTest.java
Modified: webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java (original)
+++ webservices/wss4j/trunk/integration/src/test/java/org/apache/wss4j/integration/test/kerberos/KerberosTest.java Tue Nov 27 09:42:58 2018
@@ -204,7 +204,7 @@ public class KerberosTest {
results.getActionResults().get(WSConstants.BST).get(0);
BinarySecurity token =
(BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
- Assert.assertTrue(token != null);
+ Assert.assertNotNull(token);
Principal principal = (Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
Assert.assertTrue(principal instanceof KerberosPrincipal);
@@ -357,7 +357,7 @@ public class KerberosTest {
results.getActionResults().get(WSConstants.BST).get(0);
BinarySecurity token =
(BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
- Assert.assertTrue(token != null);
+ Assert.assertNotNull(token);
Principal principal = (Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
Assert.assertTrue(principal instanceof KerberosPrincipal);
@@ -435,7 +435,7 @@ public class KerberosTest {
results.getActionResults().get(WSConstants.BST).get(0);
BinarySecurity token =
(BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
- Assert.assertTrue(token != null);
+ Assert.assertNotNull(token);
Principal principal = (Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
Assert.assertTrue(principal instanceof KerberosPrincipal);
@@ -508,7 +508,7 @@ public class KerberosTest {
results.getActionResults().get(WSConstants.BST).get(0);
BinarySecurity token =
(BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
- Assert.assertTrue(token != null);
+ Assert.assertNotNull(token);
Principal principal = (Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
Assert.assertTrue(principal instanceof KerberosPrincipal);
@@ -584,7 +584,7 @@ public class KerberosTest {
results.getActionResults().get(WSConstants.BST).get(0);
BinarySecurity token =
(BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
- Assert.assertTrue(token != null);
+ Assert.assertNotNull(token);
Principal principal = (Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
Assert.assertTrue(principal instanceof KerberosPrincipal);
@@ -659,7 +659,7 @@ public class KerberosTest {
results.getActionResults().get(WSConstants.BST).get(0);
BinarySecurity token =
(BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
- Assert.assertTrue(token != null);
+ Assert.assertNotNull(token);
Principal principal = (Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
Assert.assertTrue(principal instanceof KerberosPrincipal);
@@ -741,7 +741,7 @@ public class KerberosTest {
results.getActionResults().get(WSConstants.BST).get(0);
BinarySecurity token =
(BinarySecurity) actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
- Assert.assertTrue(token != null);
+ Assert.assertNotNull(token);
Principal principal = (Principal) actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
Assert.assertTrue(principal instanceof KerberosPrincipal);
@@ -1007,7 +1007,7 @@ public class KerberosTest {
results.getActionResults().get(WSConstants.BST).get(0);
BinarySecurity token =
(BinarySecurity) actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
- Assert.assertTrue(token != null);
+ Assert.assertNotNull(token);
Principal principal = (Principal) actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
Assert.assertTrue(principal instanceof KerberosPrincipal);
Modified: webservices/wss4j/trunk/policy/src/test/java/org/apache/wss4j/policy/tests/SamlTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/policy/src/test/java/org/apache/wss4j/policy/tests/SamlTokenTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/policy/src/test/java/org/apache/wss4j/policy/tests/SamlTokenTest.java (original)
+++ webservices/wss4j/trunk/policy/src/test/java/org/apache/wss4j/policy/tests/SamlTokenTest.java Tue Nov 27 09:42:58 2018
@@ -52,7 +52,7 @@ public class SamlTokenTest extends Abstr
assertEquals(SP12Constants.SAML_TOKEN, samlToken.getName());
assertEquals(SamlToken.SamlTokenType.WssSamlV20Token11, samlToken.getSamlTokenType());
assertTrue(samlToken.isRequireKeyIdentifierReference());
- assertTrue(samlToken.getClaims() != null);
+ assertNotNull(samlToken.getClaims());
count++;
}
assertEquals(1, count);
@@ -87,6 +87,6 @@ public class SamlTokenTest extends Abstr
assertEquals(SP12Constants.SAML_TOKEN, samlToken.getName());
assertEquals(SamlToken.SamlTokenType.WssSamlV20Token11, samlToken.getSamlTokenType());
assertTrue(samlToken.isRequireKeyIdentifierReference());
- assertTrue(samlToken.getClaims() != null);
+ assertNotNull(samlToken.getClaims());
}
}
Modified: webservices/wss4j/trunk/ws-security-common/src/test/java/org/apache/wss4j/common/crypto/NameConstraintsTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-common/src/test/java/org/apache/wss4j/common/crypto/NameConstraintsTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-common/src/test/java/org/apache/wss4j/common/crypto/NameConstraintsTest.java (original)
+++ webservices/wss4j/trunk/ws-security-common/src/test/java/org/apache/wss4j/common/crypto/NameConstraintsTest.java Tue Nov 27 09:42:58 2018
@@ -105,7 +105,7 @@ public class NameConstraintsTest extends
// We're loading a single cert chain; there will be one alias
Enumeration<String> aliases = keystore.aliases();
Certificate[] certificates = keystore.getCertificateChain(aliases.nextElement());
- assertTrue(certificates != null);
+ assertNotNull(certificates);
X509Certificate[] x509Certificates = new X509Certificate[certificates.length];
System.arraycopy(certificates, 0, x509Certificates, 0, certificates.length);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CertificateStoreTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CertificateStoreTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CertificateStoreTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CertificateStoreTest.java Tue Nov 27 09:42:58 2018
@@ -100,7 +100,7 @@ public class CertificateStoreTest extend
WSSecurityEngineResult result = signatureResults.get(0);
X509Certificate cert =
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
- assertTrue(cert != null);
+ assertNotNull(cert);
}
/**
@@ -138,7 +138,7 @@ public class CertificateStoreTest extend
WSSecurityEngineResult result = signatureResults.get(0);
X509Certificate cert =
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
- assertTrue(cert != null);
+ assertNotNull(cert);
}
/**
@@ -172,7 +172,7 @@ public class CertificateStoreTest extend
WSSecurityEngineResult result = signatureResults.get(0);
X509Certificate cert =
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
- assertTrue(cert != null);
+ assertNotNull(cert);
}
/**
@@ -206,7 +206,7 @@ public class CertificateStoreTest extend
X509Certificate cert =
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
- assertTrue(cert != null);
+ assertNotNull(cert);
}
/**
@@ -240,7 +240,7 @@ public class CertificateStoreTest extend
WSSecurityEngineResult result = signatureResults.get(0);
X509Certificate cert =
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
- assertTrue(cert != null);
+ assertNotNull(cert);
}
/**
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CryptoTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CryptoTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CryptoTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/CryptoTest.java Tue Nov 27 09:42:58 2018
@@ -53,14 +53,14 @@ public class CryptoTest extends org.juni
@Test
public void testCrypto() throws Exception {
Crypto crypto = CryptoFactory.getInstance();
- assertTrue(crypto != null);
+ assertNotNull(crypto);
}
@Test
public void testMerlinWithNullProperties()
throws Exception {
Crypto crypto = new NullPropertiesCrypto();
- assertTrue(crypto != null);
+ assertNotNull(crypto);
}
/**
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/WSSConfigTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/WSSConfigTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/WSSConfigTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/components/crypto/WSSConfigTest.java Tue Nov 27 09:42:58 2018
@@ -36,17 +36,17 @@ public class WSSConfigTest extends org.j
WSSConfig.init();
// Check providers
- assertTrue(Security.getProvider("STRTransform") != null);
- assertTrue(Security.getProvider("AttachmentContentSignatureTransform") != null);
- assertTrue(Security.getProvider("AttachmentCompleteSignatureTransform") != null);
- assertTrue(Security.getProvider("ApacheXMLDSig") != null);
+ assertNotNull(Security.getProvider("STRTransform"));
+ assertNotNull(Security.getProvider("AttachmentContentSignatureTransform"));
+ assertNotNull(Security.getProvider("AttachmentCompleteSignatureTransform"));
+ assertNotNull(Security.getProvider("ApacheXMLDSig"));
WSSConfig.cleanUp();
- assertTrue(Security.getProvider("STRTransform") == null);
- assertTrue(Security.getProvider("AttachmentContentSignatureTransform") == null);
- assertTrue(Security.getProvider("AttachmentCompleteSignatureTransform") == null);
- assertTrue(Security.getProvider("ApacheXMLDSig") == null);
+ assertNull(Security.getProvider("STRTransform"));
+ assertNull(Security.getProvider("AttachmentContentSignatureTransform"));
+ assertNull(Security.getProvider("AttachmentCompleteSignatureTransform"));
+ assertNull(Security.getProvider("ApacheXMLDSig"));
}
@@ -56,22 +56,22 @@ public class WSSConfigTest extends org.j
WSProviderConfig.init();
// Check providers
- assertTrue(Security.getProvider("ApacheXMLDSig") != null);
+ assertNotNull(Security.getProvider("ApacheXMLDSig"));
WSProviderConfig.cleanUp();
- assertTrue(Security.getProvider("ApacheXMLDSig") == null);
+ assertNull(Security.getProvider("ApacheXMLDSig"));
WSProviderConfig.init(true, true, true);
- assertTrue(Security.getProvider("ApacheXMLDSig") != null);
- assertTrue(Security.getProvider("BC") != null);
- assertTrue(Security.getProvider("TLSP") != null);
+ assertNotNull(Security.getProvider("ApacheXMLDSig"));
+ assertNotNull(Security.getProvider("BC"));
+ assertNotNull(Security.getProvider("TLSP"));
WSProviderConfig.cleanUp();
- assertTrue(Security.getProvider("ApacheXMLDSig") == null);
- assertTrue(Security.getProvider("BC") == null);
- assertTrue(Security.getProvider("TLSP") == null);
+ assertNull(Security.getProvider("ApacheXMLDSig"));
+ assertNull(Security.getProvider("BC"));
+ assertNull(Security.getProvider("TLSP"));
}
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomTokenTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/CustomTokenTest.java Tue Nov 27 09:42:58 2018
@@ -100,11 +100,11 @@ public class CustomTokenTest extends org
secEngine.processSecurityHeader(doc, null, null, null);
WSSecurityEngineResult actionResult =
wsResults.getActionResults().get(WSConstants.TS).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
Timestamp receivedTimestamp =
(Timestamp)actionResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
- assertTrue(receivedTimestamp != null);
+ assertNotNull(receivedTimestamp);
}
private static class CustomCallbackHandler implements CallbackHandler {
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureConfirmationTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureConfirmationTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureConfirmationTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/handler/SignatureConfirmationTest.java Tue Nov 27 09:42:58 2018
@@ -139,7 +139,7 @@ public class SignatureConfirmationTest e
msgContext = (java.util.Map<String, Object>)reqData.getMsgContext();
Set<Integer> savedSignatures =
(Set<Integer>)msgContext.get(WSHandlerConstants.SEND_SIGV);
- assertTrue(savedSignatures == null);
+ assertNull(savedSignatures);
}
@@ -267,8 +267,8 @@ public class SignatureConfirmationTest e
results = verify(doc);
WSSecurityEngineResult scResult =
results.getActionResults().get(WSConstants.SC).get(0);
- assertTrue(scResult != null);
- assertTrue(scResult.get(WSSecurityEngineResult.TAG_SIGNATURE_CONFIRMATION) != null);
+ assertNotNull(scResult);
+ assertNotNull(scResult.get(WSSecurityEngineResult.TAG_SIGNATURE_CONFIRMATION));
handler.signatureConfirmation(reqData, results);
}
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/DerivedKeyTest.java Tue Nov 27 09:42:58 2018
@@ -171,9 +171,9 @@ public class DerivedKeyTest extends org.
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
- assertTrue(actionResult.get(WSSecurityEngineResult.TAG_SECRET) != null);
+ assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_SECRET));
}
@@ -213,9 +213,9 @@ public class DerivedKeyTest extends org.
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
- assertTrue(actionResult.get(WSSecurityEngineResult.TAG_SECRET) != null);
+ assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_SECRET));
}
@@ -254,9 +254,9 @@ public class DerivedKeyTest extends org.
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
- assertTrue(actionResult.get(WSSecurityEngineResult.TAG_SECRET) != null);
+ assertNotNull(actionResult.get(WSSecurityEngineResult.TAG_SECRET));
}
@Test
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedDataInHeaderTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedDataInHeaderTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedDataInHeaderTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptedDataInHeaderTest.java Tue Nov 27 09:42:58 2018
@@ -104,7 +104,7 @@ public class EncryptedDataInHeaderTest e
WSHandlerResult results = verify(doc);
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
}
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionPartsTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionPartsTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionPartsTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/EncryptionPartsTest.java Tue Nov 27 09:42:58 2018
@@ -121,7 +121,7 @@ public class EncryptionPartsTest extends
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -284,7 +284,7 @@ public class EncryptionPartsTest extends
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -332,7 +332,7 @@ public class EncryptionPartsTest extends
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -448,7 +448,7 @@ public class EncryptionPartsTest extends
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
@SuppressWarnings("unchecked")
@@ -511,7 +511,7 @@ public class EncryptionPartsTest extends
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
@SuppressWarnings("unchecked")
final List<WSDataRef> refs =
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SecurityContextTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SecurityContextTokenTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SecurityContextTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SecurityContextTokenTest.java Tue Nov 27 09:42:58 2018
@@ -130,7 +130,7 @@ public class SecurityContextTokenTest ex
results.getActionResults().get(WSConstants.SCT).get(0);
SecurityContextToken receivedToken =
(SecurityContextToken) actionResult.get(WSSecurityEngineResult.TAG_SECURITY_CONTEXT_TOKEN);
- assertTrue(receivedToken != null);
+ assertNotNull(receivedToken);
assertTrue(WSConstants.WSC_SCT_05_12.equals(receivedToken.getTokenType()));
SecurityContextToken clone = new SecurityContextToken(receivedToken.getElement());
@@ -180,7 +180,7 @@ public class SecurityContextTokenTest ex
results.getActionResults().get(WSConstants.SCT).get(0);
SecurityContextToken receivedToken =
(SecurityContextToken) actionResult.get(WSSecurityEngineResult.TAG_SECURITY_CONTEXT_TOKEN);
- assertTrue(receivedToken != null);
+ assertNotNull(receivedToken);
assertTrue(WSConstants.WSC_SCT_05_12.equals(receivedToken.getTokenType()));
} catch (Exception e) {
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCRLTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCRLTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCRLTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCRLTest.java Tue Nov 27 09:42:58 2018
@@ -112,7 +112,7 @@ public class SignatureCRLTest extends or
results.getActionResults().get(WSConstants.SIGN).get(0);
X509Certificate cert =
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
- assertTrue(cert != null);
+ assertNotNull(cert);
}
/**
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCertTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCertTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCertTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureCertTest.java Tue Nov 27 09:42:58 2018
@@ -116,7 +116,7 @@ public class SignatureCertTest extends o
results.getActionResults().get(WSConstants.SIGN).get(0);
X509Certificate cert =
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
- assertTrue(cert != null);
+ assertNotNull(cert);
}
//disabling this test as the certs are expired
@@ -156,7 +156,7 @@ public class SignatureCertTest extends o
results.getActionResults().get(WSConstants.SIGN).get(0);
X509Certificate cert =
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
- assertTrue(cert != null);
+ assertNotNull(cert);
X509Certificate[] certs =
(X509Certificate[])result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATES);
assertTrue(certs != null && certs.length == 2);
@@ -193,7 +193,7 @@ public class SignatureCertTest extends o
results.getActionResults().get(WSConstants.SIGN).get(0);
X509Certificate cert =
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
- assertTrue(cert != null);
+ assertNotNull(cert);
X509Certificate[] certs =
(X509Certificate[])result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATES);
assertTrue(certs != null && certs.length == 2);
@@ -299,7 +299,7 @@ public class SignatureCertTest extends o
results.getActionResults().get(WSConstants.SIGN).get(0);
X509Certificate cert =
(X509Certificate)result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATE);
- assertTrue(cert != null);
+ assertNotNull(cert);
X509Certificate[] certs =
(X509Certificate[])result.get(WSSecurityEngineResult.TAG_X509_CERTIFICATES);
assertTrue(certs != null && certs.length == 2);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureKeyValueTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureKeyValueTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureKeyValueTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureKeyValueTest.java Tue Nov 27 09:42:58 2018
@@ -88,7 +88,7 @@ public class SignatureKeyValueTest exten
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
java.security.Principal principal =
(java.security.Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
@@ -167,7 +167,7 @@ public class SignatureKeyValueTest exten
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
java.security.Principal principal =
(java.security.Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignaturePartsTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignaturePartsTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignaturePartsTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignaturePartsTest.java Tue Nov 27 09:42:58 2018
@@ -131,7 +131,7 @@ public class SignaturePartsTest extends
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -333,12 +333,12 @@ public class SignaturePartsTest extends
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) stUnsignedActionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
WSSecurityEngineResult signActionResult =
results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(signActionResult != null);
+ assertNotNull(signActionResult);
assertFalse(signActionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) signActionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -449,7 +449,7 @@ public class SignaturePartsTest extends
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
@SuppressWarnings("unchecked")
@@ -513,7 +513,7 @@ public class SignaturePartsTest extends
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
@SuppressWarnings("unchecked")
final List<WSDataRef> refs =
@@ -584,7 +584,7 @@ public class SignaturePartsTest extends
WSSecurityEngineResult actionResult =
results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/TimestampTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/TimestampTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/TimestampTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/TimestampTest.java Tue Nov 27 09:42:58 2018
@@ -86,11 +86,11 @@ public class TimestampTest extends org.j
WSHandlerResult wsResult = verify(createdDoc);
WSSecurityEngineResult actionResult =
wsResult.getActionResults().get(WSConstants.TS).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
Timestamp receivedTimestamp =
(Timestamp)actionResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
- assertTrue(receivedTimestamp != null);
+ assertNotNull(receivedTimestamp);
Timestamp clone = new Timestamp(receivedTimestamp.getElement(), new BSPEnforcer(true));
assertTrue(clone.equals(receivedTimestamp));
@@ -124,11 +124,11 @@ public class TimestampTest extends org.j
WSHandlerResult wsResult = verify(createdDoc);
WSSecurityEngineResult actionResult =
wsResult.getActionResults().get(WSConstants.TS).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
Timestamp receivedTimestamp =
(Timestamp)actionResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
- assertTrue(receivedTimestamp != null);
+ assertNotNull(receivedTimestamp);
}
@Test
@@ -167,11 +167,11 @@ public class TimestampTest extends org.j
WSHandlerResult wsResult = secEngine.processSecurityHeader(doc, requestData);
WSSecurityEngineResult actionResult =
wsResult.getActionResults().get(WSConstants.TS).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
Timestamp receivedTimestamp =
(Timestamp)actionResult.get(WSSecurityEngineResult.TAG_TIMESTAMP);
- assertTrue(receivedTimestamp != null);
+ assertNotNull(receivedTimestamp);
}
@@ -832,7 +832,7 @@ public class TimestampTest extends org.j
WSHandlerResult wsResult = verify(createdDoc);
WSSecurityEngineResult actionResult =
wsResult.getActionResults().get(WSConstants.TS).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
}
@Test
@@ -856,7 +856,7 @@ public class TimestampTest extends org.j
WSHandlerResult wsResult = verify(createdDoc);
WSSecurityEngineResult actionResult =
wsResult.getActionResults().get(WSConstants.TS).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
} finally {
Locale.setDefault(defaultLocale);
}
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UsernameTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UsernameTokenTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UsernameTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/UsernameTokenTest.java Tue Nov 27 09:42:58 2018
@@ -148,7 +148,7 @@ public class UsernameTokenTest extends o
results.getActionResults().get(WSConstants.UT).get(0);
UsernameToken receivedToken =
(UsernameToken) actionResult.get(WSSecurityEngineResult.TAG_USERNAME_TOKEN);
- assertTrue(receivedToken != null);
+ assertNotNull(receivedToken);
UsernameToken clone =
new UsernameToken(receivedToken.getElement(), false, new BSPEnforcer());
@@ -443,7 +443,7 @@ public class UsernameTokenTest extends o
results.getActionResults().get(WSConstants.UT).get(0);
UsernameToken receivedToken =
(UsernameToken) actionResult.get(WSSecurityEngineResult.TAG_USERNAME_TOKEN);
- assertTrue(receivedToken != null);
+ assertNotNull(receivedToken);
UsernameToken clone =
new UsernameToken(receivedToken.getElement(), false, new BSPEnforcer());
@@ -587,7 +587,7 @@ public class UsernameTokenTest extends o
results.getActionResults().get(WSConstants.UT_NOPASSWORD).get(0);
UsernameToken receivedToken =
(UsernameToken) actionResult.get(WSSecurityEngineResult.TAG_USERNAME_TOKEN);
- assertTrue(receivedToken != null);
+ assertNotNull(receivedToken);
}
/**
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/BSTKerberosTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/BSTKerberosTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/BSTKerberosTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/message/token/BSTKerberosTest.java Tue Nov 27 09:42:58 2018
@@ -99,7 +99,7 @@ public class BSTKerberosTest extends org
assertTrue(AP_REQ.equals(bst.getValueType()));
assertTrue(BASE64_NS.equals(bst.getEncodingType()));
- assertTrue(bst.getToken() != null);
+ assertNotNull(bst.getToken());
}
@@ -205,11 +205,11 @@ public class BSTKerberosTest extends org
results.getActionResults().get(WSConstants.BST).get(0);
BinarySecurity token =
(BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
- assertTrue(token != null);
+ assertNotNull(token);
assertTrue(AP_REQ.equals(token.getValueType()));
assertTrue(BASE64_NS.equals(token.getEncodingType()));
- assertTrue(token.getToken() != null);
+ assertNotNull(token.getToken());
}
/**
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/misc/PrincipalTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/misc/PrincipalTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/misc/PrincipalTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/misc/PrincipalTest.java Tue Nov 27 09:42:58 2018
@@ -97,9 +97,9 @@ public class PrincipalTest extends org.j
assertTrue(principal instanceof UsernameTokenPrincipal);
assertTrue("wernerd".equals(principal.getName()));
UsernameTokenPrincipal userPrincipal = (UsernameTokenPrincipal)principal;
- assertTrue(userPrincipal.getCreatedTime() != null);
- assertTrue(userPrincipal.getNonce() != null);
- assertTrue(userPrincipal.getPassword() != null);
+ assertNotNull(userPrincipal.getCreatedTime());
+ assertNotNull(userPrincipal.getNonce());
+ assertNotNull(userPrincipal.getPassword());
assertTrue(userPrincipal.isPasswordDigest());
assertTrue(WSConstants.PASSWORD_DIGEST.equals(userPrincipal.getPasswordType()));
}
@@ -130,7 +130,7 @@ public class PrincipalTest extends org.j
(Principal)results.getResults().get(0).get(WSSecurityEngineResult.TAG_PRINCIPAL);
assertTrue(principal instanceof SAMLTokenPrincipal);
assertTrue(principal.getName().contains("uid=joe"));
- assertTrue(((SAMLTokenPrincipal)principal).getToken() != null);
+ assertNotNull(((SAMLTokenPrincipal)principal).getToken());
}
/**
@@ -168,12 +168,12 @@ public class PrincipalTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
Principal principal = (Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
assertTrue(principal instanceof SAMLTokenPrincipal);
assertTrue(principal.getName().contains("uid=joe"));
- assertTrue(((SAMLTokenPrincipal)principal).getToken() != null);
+ assertNotNull(((SAMLTokenPrincipal)principal).getToken());
}
/**
@@ -211,12 +211,12 @@ public class PrincipalTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
Principal principal = (Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
assertTrue(principal instanceof SAMLTokenPrincipal);
assertTrue(principal.getName().contains("uid=joe"));
- assertTrue(((SAMLTokenPrincipal)principal).getToken() != null);
+ assertNotNull(((SAMLTokenPrincipal)principal).getToken());
}
/**
@@ -256,12 +256,12 @@ public class PrincipalTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
Principal principal = (Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
assertTrue(principal instanceof SAMLTokenPrincipal);
assertTrue(principal.getName().contains("uid=joe"));
- assertTrue(((SAMLTokenPrincipal)principal).getToken() != null);
+ assertNotNull(((SAMLTokenPrincipal)principal).getToken());
}
/**
@@ -304,7 +304,7 @@ public class PrincipalTest extends org.j
Principal principal = (Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
assertTrue(principal instanceof SAMLTokenPrincipal);
assertTrue(principal.getName().contains("uid=joe"));
- assertTrue(((SAMLTokenPrincipal)principal).getToken() != null);
+ assertNotNull(((SAMLTokenPrincipal)principal).getToken());
}
/**
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlReferenceTest.java Tue Nov 27 09:42:58 2018
@@ -138,11 +138,11 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
// Test we processed a signature (SAML assertion + SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -202,11 +202,11 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
// Test we processed a signature (SAML assertion + SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -267,12 +267,12 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -332,12 +332,12 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -465,12 +465,12 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed an encrypted element
actionResult = results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -541,12 +541,12 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed an encrypted element
actionResult = results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -600,11 +600,11 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
// Test we processed a signature (SAML assertion + SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -663,11 +663,11 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
// Test we processed a signature (SAML assertion + SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -728,12 +728,12 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -794,12 +794,12 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -869,12 +869,12 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed an encrypted element
actionResult = results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -945,12 +945,12 @@ public class SamlReferenceTest extends o
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed an encrypted element
actionResult = results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenDerivedTest.java Tue Nov 27 09:42:58 2018
@@ -121,11 +121,11 @@ public class SamlTokenDerivedTest extend
results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
// Test we processed a signature (SAML assertion + SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenHOKTest.java Tue Nov 27 09:42:58 2018
@@ -102,7 +102,7 @@ public class SamlTokenHOKTest extends or
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
assertNotNull(receivedSamlAssertion.assertionToString());
}
@@ -154,7 +154,7 @@ public class SamlTokenHOKTest extends or
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
}
@@ -194,7 +194,7 @@ public class SamlTokenHOKTest extends or
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
}
@@ -245,7 +245,7 @@ public class SamlTokenHOKTest extends or
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
}
/**
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenSVTest.java Tue Nov 27 09:42:58 2018
@@ -111,11 +111,11 @@ public class SamlTokenSVTest extends org
results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
// Test we processed a signature (SAML assertion + SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -171,11 +171,11 @@ public class SamlTokenSVTest extends org
results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
// Test we processed a signature (SAML assertion + SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -231,11 +231,11 @@ public class SamlTokenSVTest extends org
results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
// Test we processed a signature (SAML assertion + SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -291,11 +291,11 @@ public class SamlTokenSVTest extends org
results.getActionResults().get(WSConstants.ST_UNSIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
// Test we processed a signature (SAML assertion + SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SamlTokenTest.java Tue Nov 27 09:42:58 2018
@@ -126,9 +126,9 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
- assertTrue(receivedSamlAssertion.getSignatureValue() == null);
+ assertNull(receivedSamlAssertion.getSignatureValue());
}
/**
@@ -148,9 +148,9 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
- assertTrue(receivedSamlAssertion.getSignatureValue() == null);
+ assertNull(receivedSamlAssertion.getSignatureValue());
}
/**
@@ -169,7 +169,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -190,7 +190,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -210,7 +210,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -230,7 +230,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -251,7 +251,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -291,7 +291,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -360,7 +360,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -401,7 +401,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -443,7 +443,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -484,7 +484,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -526,7 +526,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -567,7 +567,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -627,7 +627,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -661,7 +661,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -708,7 +708,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -755,7 +755,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -819,12 +819,12 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
- assertTrue(receivedSamlAssertion.getElement() != null);
+ assertNotNull(receivedSamlAssertion);
+ assertNotNull(receivedSamlAssertion.getElement());
assertTrue("Assertion".equals(receivedSamlAssertion.getElement().getLocalName()));
actionResult = results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
}
@Test
@@ -932,12 +932,12 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
- assertTrue(receivedSamlAssertion.getElement() != null);
+ assertNotNull(receivedSamlAssertion);
+ assertNotNull(receivedSamlAssertion.getElement());
assertTrue("Assertion".equals(receivedSamlAssertion.getElement().getLocalName()));
actionResult = results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
}
@Test
@@ -1006,12 +1006,12 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
- assertTrue(receivedSamlAssertion.getElement() != null);
+ assertNotNull(receivedSamlAssertion);
+ assertNotNull(receivedSamlAssertion.getElement());
assertTrue("Assertion".equals(receivedSamlAssertion.getElement().getLocalName()));
actionResult = results.getActionResults().get(WSConstants.ENCR).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
}
@Test
@@ -1245,7 +1245,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -1290,7 +1290,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -1326,7 +1326,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
}
@@ -1345,7 +1345,7 @@ public class SamlTokenTest extends org.j
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertFalse(receivedSamlAssertion.isSigned());
Principal receivedPrincipal = (Principal)actionResult.get(WSSecurityEngineResult.TAG_PRINCIPAL);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/saml/SignedSamlTokenHOKTest.java Tue Nov 27 09:42:58 2018
@@ -156,9 +156,9 @@ public class SignedSamlTokenHOKTest exte
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
- assertTrue(receivedSamlAssertion.getSignatureValue() != null);
+ assertNotNull(receivedSamlAssertion.getSignatureValue());
// Test we have a WSDataRef for the signed SAML token as well
List<WSDataRef> refs =
@@ -171,7 +171,7 @@ public class SignedSamlTokenHOKTest exte
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
refs = (List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
assertTrue(refs.size() == 1);
@@ -227,12 +227,12 @@ public class SignedSamlTokenHOKTest exte
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedAssertion != null);
+ assertNotNull(receivedAssertion);
assertTrue(receivedAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
@SuppressWarnings("unchecked")
final List<WSDataRef> refs =
@@ -290,12 +290,12 @@ public class SignedSamlTokenHOKTest exte
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -352,12 +352,12 @@ public class SignedSamlTokenHOKTest exte
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedAssertion != null);
+ assertNotNull(receivedAssertion);
assertTrue(receivedAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
@SuppressWarnings("unchecked")
final List<WSDataRef> refs =
@@ -414,12 +414,12 @@ public class SignedSamlTokenHOKTest exte
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -475,12 +475,12 @@ public class SignedSamlTokenHOKTest exte
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assert receivedSamlAssertion.isSigned();
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -536,12 +536,12 @@ public class SignedSamlTokenHOKTest exte
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -603,12 +603,12 @@ public class SignedSamlTokenHOKTest exte
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -681,12 +681,12 @@ public class SignedSamlTokenHOKTest exte
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedAssertion != null);
+ assertNotNull(receivedAssertion);
assertTrue(receivedAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
@SuppressWarnings("unchecked")
final List<WSDataRef> refs =
@@ -782,12 +782,12 @@ public class SignedSamlTokenHOKTest exte
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
@@ -843,12 +843,12 @@ public class SignedSamlTokenHOKTest exte
results.getActionResults().get(WSConstants.ST_SIGNED).get(0);
SamlAssertionWrapper receivedSamlAssertion =
(SamlAssertionWrapper) actionResult.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
- assertTrue(receivedSamlAssertion != null);
+ assertNotNull(receivedSamlAssertion);
assertTrue(receivedSamlAssertion.isSigned());
// Test we processed a signature (SOAP body)
actionResult = results.getActionResults().get(WSConstants.SIGN).get(0);
- assertTrue(actionResult != null);
+ assertNotNull(actionResult);
assertFalse(actionResult.isEmpty());
final List<WSDataRef> refs =
(List<WSDataRef>) actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
Modified: webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java (original)
+++ webservices/wss4j/trunk/ws-security-dom/src/test/java/org/apache/wss4j/dom/validate/ValidatorTest.java Tue Nov 27 09:42:58 2018
@@ -221,11 +221,11 @@ public class ValidatorTest extends org.j
BinarySecurity token =
(BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
- assertTrue(token != null);
+ assertNotNull(token);
SamlAssertionWrapper samlAssertion =
(SamlAssertionWrapper)actionResult.get(WSSecurityEngineResult.TAG_TRANSFORMED_TOKEN);
- assertTrue(samlAssertion != null);
+ assertNotNull(samlAssertion);
}
/**
@@ -272,7 +272,7 @@ public class ValidatorTest extends org.j
BinarySecurity token =
(BinarySecurity)actionResult.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN);
- assertTrue(token != null);
+ assertNotNull(token);
}
Modified: webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationConverterTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationConverterTest.java?rev=1847523&r1=1847522&r2=1847523&view=diff
==============================================================================
--- webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationConverterTest.java (original)
+++ webservices/wss4j/trunk/ws-security-stax/src/test/java/org/apache/wss4j/stax/test/ConfigurationConverterTest.java Tue Nov 27 09:42:58 2018
@@ -86,7 +86,7 @@ public class ConfigurationConverterTest
WSSecurityTokenConstants.KEYIDENTIFIER_THUMBPRINT_IDENTIFIER);
Assert.assertFalse(properties.isAddExcC14NInclusivePrefixes());
Assert.assertNotNull(properties.getSignatureCrypto());
- Assert.assertTrue(properties.getSignatureSecureParts() != null);
+ Assert.assertNotNull(properties.getSignatureSecureParts());
Assert.assertEquals(properties.getSignatureSecureParts().size(), 1);
Assert.assertEquals(properties.getSignatureSecureParts().get(0).getName().getLocalPart(),
"Body");
@@ -141,7 +141,7 @@ public class ConfigurationConverterTest
Assert.assertEquals(properties.getEncryptionKeyIdentifier(),
WSSecurityTokenConstants.KEYIDENTIFIER_ENCRYPTED_KEY_SHA1_IDENTIFIER);
Assert.assertNotNull(properties.getEncryptionCrypto());
- Assert.assertTrue(properties.getEncryptionSecureParts() != null);
+ Assert.assertNotNull(properties.getEncryptionSecureParts());
Assert.assertEquals(properties.getEncryptionSecureParts().size(), 1);
Assert.assertEquals(properties.getEncryptionSecureParts().get(0).getName().getLocalPart(),
"Body");