juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject svn commit: r1563432 - in /juddi/trunk: juddi-core/src/main/java/org/apache/juddi/validation/ValidateInquiry.java juddi-core/src/main/resources/messages.properties uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java
Date Sat, 01 Feb 2014 15:43:41 GMT
Author: alexoree
Date: Sat Feb  1 15:43:41 2014
New Revision: 1563432

URL: http://svn.apache.org/r1563432
Log:
JUDDI-785 enabling all CASE_INSENSITIVE_SORT tests with exclusions for juddi, adding tests
for unknown find qualifiers and validators to throw on unsupported fqs

Modified:
    juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateInquiry.java
    juddi/trunk/juddi-core/src/main/resources/messages.properties
    juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java

Modified: juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateInquiry.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateInquiry.java?rev=1563432&r1=1563431&r2=1563432&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateInquiry.java
(original)
+++ juddi/trunk/juddi-core/src/main/java/org/apache/juddi/validation/ValidateInquiry.java
Sat Feb  1 15:43:41 2014
@@ -16,9 +16,11 @@
  */
 package org.apache.juddi.validation;
 
+import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
 import java.util.Hashtable;
+import java.util.Map;
 
 import org.uddi.api_v3.GetBusinessDetail;
 import org.uddi.api_v3.GetOperationalInfo;
@@ -39,11 +41,11 @@ import org.uddi.v3_service.DispositionRe
 
 import org.apache.juddi.model.UddiEntityPublisher;
 import org.apache.juddi.query.util.FindQualifiers;
-import org.apache.juddi.v3.client.UDDIConstants;
 import org.apache.juddi.v3.error.ErrorMessage;
 import org.apache.juddi.v3.error.FatalErrorException;
 import org.apache.juddi.v3.error.InvalidCombinationException;
 import org.apache.juddi.v3.error.InvalidKeyPassedException;
+import org.apache.juddi.v3.error.UnsupportedException;
 import org.apache.juddi.v3.error.ValueNotAllowedException;
 
 /**
@@ -214,7 +216,7 @@ public class ValidateInquiry extends Val
                 }
 
                 if (body.getCategoryBag() == null && body.getFindTModel() == null
&& body.getTModelBag() == null && body.getName().size() == 0
-                        && body.getIdentifierBag() == null && body.getDiscoveryURLs()
== null && body.getFindRelatedBusinesses() == null) {
+                     && body.getIdentifierBag() == null && body.getDiscoveryURLs()
== null && body.getFindRelatedBusinesses() == null) {
                         throw new FatalErrorException(new ErrorMessage("errors.findbusiness.NoInput"));
                 }
 
@@ -235,10 +237,9 @@ public class ValidateInquiry extends Val
                         throw new FatalErrorException(new ErrorMessage("errors.NullInput"));
                 }
 
-                if (body.getCategoryBag() == null && body.getFindTModel() == null
&& 
-                		(body.getTModelBag() == null || body.getTModelBag().getTModelKey().size()
== 0)
-                		&& body.getName().size() == 0 && body.getBusinessKey()
== null) 
-                {
+                if (body.getCategoryBag() == null && body.getFindTModel() == null
+                     && (body.getTModelBag() == null || body.getTModelBag().getTModelKey().size()
== 0)
+                     && body.getName().size() == 0 && body.getBusinessKey()
== null) {
                         throw new FatalErrorException(new ErrorMessage("errors.findservice.NoInput"));
                 }
 
@@ -300,8 +301,8 @@ public class ValidateInquiry extends Val
                 }
 
                 if ((body.getBusinessKey() == null || body.getBusinessKey().length() == 0)
-                        && (body.getFromKey() == null || body.getFromKey().length()
== 0)
-                        && (body.getToKey() == null || body.getToKey().length() ==
0)) {
+                     && (body.getFromKey() == null || body.getFromKey().length()
== 0)
+                     && (body.getToKey() == null || body.getToKey().length() == 0))
{
                         throw new FatalErrorException(new ErrorMessage("errors.findrelatedbusiness.NoInput"));
                 }
 
@@ -334,8 +335,8 @@ public class ValidateInquiry extends Val
                 KeyedReference keyedRef = body.getKeyedReference();
                 if (keyedRef != null) {
                         if (keyedRef.getTModelKey() == null || keyedRef.getTModelKey().length()
== 0
-                                || keyedRef.getKeyName() == null || keyedRef.getKeyName().length()
== 0
-                                || keyedRef.getKeyValue() == null || keyedRef.getKeyValue().length()
== 0) {
+                             || keyedRef.getKeyName() == null || keyedRef.getKeyName().length()
== 0
+                             || keyedRef.getKeyValue() == null || keyedRef.getKeyValue().length()
== 0) {
                                 throw new ValueNotAllowedException(new ErrorMessage("errors.findrelatedbusiness.BlankKeyedRef"));
                         }
 
@@ -484,6 +485,8 @@ public class ValidateInquiry extends Val
                                 throw new ValueNotAllowedException(new ErrorMessage("errors.findqualifiers.DuplicateValue",
result));
                         }
 
+                        ValidateSupportedFindQualifier(fq);
+
                         // Invalid combo: andAllKeys, orAllKeys, and orLikeKeys
                         if (fq.equalsIgnoreCase(FindQualifiers.AND_ALL_KEYS) || fq.equalsIgnoreCase(FindQualifiers.AND_ALL_KEYS_TMODEL))
{
                                 if (fqTable.get(FindQualifiers.OR_ALL_KEYS.toUpperCase())
!= null || fqTable.get(FindQualifiers.OR_ALL_KEYS_TMODEL.toUpperCase()) != null) {
@@ -645,25 +648,25 @@ public class ValidateInquiry extends Val
                         return;
                 }
                 for (int i = 0; i < findQualifiers.getFindQualifier().size(); i++) {
-                        if (findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.BINARY_SORT)
|| findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.BINARY_SORT_TMODEL)) {
+                        if (findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.BINARY_SORT)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.BINARY_SORT_TMODEL))
{
                                 throw new InvalidCombinationException(new ErrorMessage("errors.findqualifiers.InvalidCombo",
FindQualifiers.BINARY_SORT));
                         }
-                        if (findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.CASE_INSENSITIVE_MATCH)
|| findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.CASE_INSENSITIVE_MATCH_TMODEL))
{
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.CASE_INSENSITIVE_MATCH)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.CASE_INSENSITIVE_MATCH_TMODEL))
{
                                 throw new InvalidCombinationException(new ErrorMessage("errors.findqualifiers.InvalidCombo",
FindQualifiers.CASE_INSENSITIVE_MATCH));
                         }
-                        if (findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.CASE_SENSITIVE_MATCH)
|| findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.CASE_SENSITIVE_MATCH_TMODEL))
{
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.CASE_SENSITIVE_MATCH)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.CASE_SENSITIVE_MATCH_TMODEL))
{
                                 throw new InvalidCombinationException(new ErrorMessage("errors.findqualifiers.InvalidCombo",
FindQualifiers.CASE_SENSITIVE_MATCH));
                         }
-                        if (findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.CASE_INSENSITIVE_SORT)
|| findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.CASE_INSENSITIVE_SORT_TMODEL))
{
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.CASE_INSENSITIVE_SORT)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.CASE_INSENSITIVE_SORT_TMODEL))
{
                                 throw new InvalidCombinationException(new ErrorMessage("errors.findqualifiers.InvalidCombo",
FindQualifiers.CASE_INSENSITIVE_SORT));
                         }
-                        if (findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.CASE_SENSITIVE_SORT)
|| findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.CASE_SENSITIVE_SORT_TMODEL))
{
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.CASE_SENSITIVE_SORT)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.CASE_SENSITIVE_SORT_TMODEL))
{
                                 throw new InvalidCombinationException(new ErrorMessage("errors.findqualifiers.InvalidCombo",
FindQualifiers.CASE_SENSITIVE_SORT_TMODEL));
                         }
-                        if (findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.SORT_BY_NAME_ASC)
|| findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.SORT_BY_NAME_ASC_TMODEL))
{
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.SORT_BY_NAME_ASC)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.SORT_BY_NAME_ASC_TMODEL))
{
                                 throw new InvalidCombinationException(new ErrorMessage("errors.findqualifiers.InvalidCombo",
FindQualifiers.SORT_BY_NAME_ASC));
                         }
-                        if (findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.SORT_BY_NAME_DESC)
|| findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.SORT_BY_NAME_DESC_TMODEL))
{
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.SORT_BY_NAME_DESC)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.SORT_BY_NAME_DESC_TMODEL))
{
                                 throw new InvalidCombinationException(new ErrorMessage("errors.findqualifiers.InvalidCombo",
FindQualifiers.SORT_BY_NAME_DESC));
                         }
                 }
@@ -674,7 +677,7 @@ public class ValidateInquiry extends Val
                         return;
                 }
                 for (int i = 0; i < findQualifiers.getFindQualifier().size(); i++) {
-                        if (findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.AND_ALL_KEYS)
|| findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.AND_ALL_KEYS_TMODEL)) {
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.AND_ALL_KEYS)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.AND_ALL_KEYS_TMODEL))
{
                                 throw new InvalidCombinationException(new ErrorMessage("errors.findqualifiers.InvalidCombo",
FindQualifiers.AND_ALL_KEYS));
                         }
                 }
@@ -687,10 +690,10 @@ public class ValidateInquiry extends Val
                 boolean containsAPPROXIMATE_MATCH = false;
                 boolean containsCOMBINE_CATEGORY_BAGS = false;
                 for (int i = 0; i < findQualifiers.getFindQualifier().size(); i++) {
-                        if (findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.APPROXIMATE_MATCH)
|| findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.APPROXIMATE_MATCH_TMODEL))
{
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.APPROXIMATE_MATCH)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.APPROXIMATE_MATCH_TMODEL))
{
                                 containsAPPROXIMATE_MATCH = true;
                         }
-                        if (findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.COMBINE_CATEGORY_BAGS)
|| findQualifiers.getFindQualifier().get(i).equals(FindQualifiers.COMBINE_CATEGORY_BAGS_TMODEL))
{
+                        if (findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.COMBINE_CATEGORY_BAGS)
|| findQualifiers.getFindQualifier().get(i).equalsIgnoreCase(FindQualifiers.COMBINE_CATEGORY_BAGS_TMODEL))
{
                                 containsCOMBINE_CATEGORY_BAGS = true;
                         }
                 }
@@ -699,4 +702,62 @@ public class ValidateInquiry extends Val
                 }
 
         }
+
+        static Map<String,Boolean> supportedFindqualifiers = null;
+        private void ValidateSupportedFindQualifier(String fq) throws UnsupportedException
{
+                if (supportedFindqualifiers==null || supportedFindqualifiers.isEmpty())
+                        InitFindQualifierMap();
+                if (supportedFindqualifiers.get(fq.toLowerCase())==null)
+                        throw new UnsupportedException(new ErrorMessage("errors.Unsupported.findQualifier",
fq));
+        }
+
+        private void InitFindQualifierMap() {
+                supportedFindqualifiers = new HashMap<String, Boolean>();
+                supportedFindqualifiers.put(FindQualifiers.AND_ALL_KEYS.toLowerCase(), true);
+                supportedFindqualifiers.put(FindQualifiers.AND_ALL_KEYS_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.APPROXIMATE_MATCH.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.APPROXIMATE_MATCH_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.BINARY_SORT.toLowerCase(), true);
+                supportedFindqualifiers.put(FindQualifiers.BINARY_SORT_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.BINDING_SUBSET.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.BINDING_SUBSET_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.CASE_INSENSITIVE_MATCH.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.CASE_INSENSITIVE_MATCH_TMODEL.toLowerCase(),
true);
+                //these are NOT supported, see JUDDI-785
+                //supportedFindqualifiers.put(FindQualifiers.CASE_INSENSITIVE_SORT.toLowerCase(),
true);
+                //supportedFindqualifiers.put(FindQualifiers.CASE_INSENSITIVE_SORT_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.CASE_SENSITIVE_MATCH.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.CASE_SENSITIVE_MATCH_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.CASE_SENSITIVE_SORT.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.CASE_SENSITIVE_SORT_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.COMBINE_CATEGORY_BAGS.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.COMBINE_CATEGORY_BAGS_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.DIACRITIC_INSENSITIVE_MATCH.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.DIACRITIC_INSENSITIVE_MATCH_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.DIACRITIC_SENSITIVE_MATCH.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.DIACRITIC_SENSITIVE_MATCH_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.EXACT_MATCH.toLowerCase(), true);
+                supportedFindqualifiers.put(FindQualifiers.EXACT_MATCH_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.OR_ALL_KEYS.toLowerCase(), true);
+                supportedFindqualifiers.put(FindQualifiers.OR_ALL_KEYS_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.OR_LIKE_KEYS.toLowerCase(), true);
+                supportedFindqualifiers.put(FindQualifiers.OR_LIKE_KEYS_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SERVICE_SUBSET.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SERVICE_SUBSET_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SIGNATURE_PRESENT.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SIGNATURE_PRESENT_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SORT_BY_DATE_ASC.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SORT_BY_DATE_ASC_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SORT_BY_DATE_DESC.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SORT_BY_DATE_DESC_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SORT_BY_NAME_ASC.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SORT_BY_NAME_ASC_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SORT_BY_NAME_DESC.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SORT_BY_NAME_DESC_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SUPPRESS_PROJECTED_SERVICES.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.SUPPRESS_PROJECTED_SERVICES_TMODEL.toLowerCase(),
true);
+                supportedFindqualifiers.put(FindQualifiers.UTS_10.toLowerCase(), true);
+                supportedFindqualifiers.put(FindQualifiers.UTS_10_TMODEL.toLowerCase(), true);
+                
+        }
 }

Modified: juddi/trunk/juddi-core/src/main/resources/messages.properties
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-core/src/main/resources/messages.properties?rev=1563432&r1=1563431&r2=1563432&view=diff
==============================================================================
--- juddi/trunk/juddi-core/src/main/resources/messages.properties (original)
+++ juddi/trunk/juddi-core/src/main/resources/messages.properties Sat Feb  1 15:43:41 2014
@@ -63,7 +63,7 @@ E_valueNotAllowed=A value did not pass v
 errors.DatatypeFactor=Can't create a DatatypeFactory instance.
 errors.Unspecified=An unspecified error occurred
 errors.Unsupported=This version does not support this feature or API
-errors.Unsupported.findQualifier=Invalid findQualifier value was passed
+errors.Unsupported.findQualifier=An invalid or unsupported findQualifier value was passed
 errors.configuration.Retrieval=An error occurred attempting to retrieve configuration information
 errors.install.AlreadyInstalled=It appears that the application is already installed.  Please
un-install before proceeding.
 errors.NullInput=No input was provided for this API call

Modified: juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java
URL: http://svn.apache.org/viewvc/juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java?rev=1563432&r1=1563431&r2=1563432&view=diff
==============================================================================
--- juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java
(original)
+++ juddi/trunk/uddi-tck/src/test/java/org/apache/juddi/v3/tck/UDDI_070_FindEntityIntegrationTest.java
Sat Feb  1 15:43:41 2014
@@ -15,6 +15,7 @@
 package org.apache.juddi.v3.tck;
 
 import java.util.Arrays;
+import java.util.UUID;
 
 import javax.xml.ws.BindingProvider;
 
@@ -26,6 +27,7 @@ import org.apache.juddi.v3.client.config
 import org.apache.juddi.v3.client.transport.Transport;
 import org.junit.AfterClass;
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.BeforeClass;
 import org.junit.Ignore;
 import org.junit.Test;
@@ -347,44 +349,43 @@ public class UDDI_070_FindEntityIntegrat
 //</editor-fold>
 
         //<editor-fold defaultstate="collapsed" desc="CASE_INSENSITIVE_SORT">
+        //see JUDDI-785, jUDDI doesn't support it, and thus should throw.
         /**
-         * Note that jUDDI ignores caseInsensiveSort. 
-         * 
-         * @see UDDIConstants.CASE_INSENSITIVE_SORT 
+         * Note that jUDDI ignores caseInsensiveSort.
+         *
+         * @see UDDIConstants.CASE_INSENSITIVE_SORT
          * @throws Exception
          */
         @Test
         public void UDDI_764caseInsensitiveSortBusiness() throws Exception {
-				findbuinsess(UDDIConstants.CASE_INSENSITIVE_SORT);
+                Assume.assumeFalse(TckPublisher.isJUDDI());
+                findbuinsess(UDDIConstants.CASE_INSENSITIVE_SORT);
         }
 
-        
         /**
-         * Note that jUDDI ignores caseInsensiveSort. 
-         * 
-         * @see UDDIConstants.CASE_INSENSITIVE_SORT 
+         * Note that jUDDI ignores caseInsensiveSort.
+         *
+         * @see UDDIConstants.CASE_INSENSITIVE_SORT
          * @throws Exception
          */
         @Test
         public void UDDI_764caseInsensitiveSortService() throws Exception {
+                Assume.assumeFalse(TckPublisher.isJUDDI());
                 findservice(UDDIConstants.CASE_INSENSITIVE_SORT);
         }
+
         /**
-         * Note that jUDDI ignores caseInsensiveSort. 
-         * 
-         * @see UDDIConstants.CASE_INSENSITIVE_SORT 
+         * Note that jUDDI ignores caseInsensiveSort.
+         *
+         * @see UDDIConstants.CASE_INSENSITIVE_SORT
          * @throws Exception
          */
         @Test
         public void UDDI_764caseInsensitiveSortTModel() throws Exception {
+                Assume.assumeFalse(TckPublisher.isJUDDI());
                 findtmodel(UDDIConstants.CASE_INSENSITIVE_SORT);
         }
-        /**
-         * Note that jUDDI ignores caseInsensiveSort. 
-         * 
-         * @see UDDIConstants.CASE_INSENSITIVE_SORT 
-         * @throws Exception
-         */
+
         @Test
         public void UDDI_764caseInsensitiveSortBinding() throws Exception {
                 try {
@@ -395,38 +396,40 @@ public class UDDI_070_FindEntityIntegrat
                         logger.debug("Expected failure: " + ex.getMessage(), ex);
                 }
         }
+
         /**
-         * Note that jUDDI ignores caseInsensiveSort. 
-         * 
-         * @see UDDIConstants.CASE_INSENSITIVE_SORT 
+         * Note that jUDDI ignores caseInsensiveSort.
+         *
+         * @see UDDIConstants.CASE_INSENSITIVE_SORT
          * @throws Exception
          */
         @Test
         public void UDDI_764caseInsensitiveSortRelatedBiz() throws Exception {
+                Assume.assumeFalse(TckPublisher.isJUDDI());
                 findrelated(UDDIConstants.CASE_INSENSITIVE_SORT);
         }
 
         @Test
-        @Ignore
         public void UDDI_764caseInsensitiveSortBusinessKey() throws Exception {
+                Assume.assumeFalse(TckPublisher.isJUDDI());
                 findbuinsess(UDDIConstants.CASE_INSENSITIVE_SORT_TMODEL);
         }
 
         @Test
-        @Ignore
         public void UDDI_764caseInsensitiveSortServiceKey() throws Exception {
+                Assume.assumeFalse(TckPublisher.isJUDDI());
                 findservice(UDDIConstants.CASE_INSENSITIVE_SORT_TMODEL);
         }
 
         @Test
-        @Ignore
         public void UDDI_764caseInsensitiveSortTModelKey() throws Exception {
+                Assume.assumeFalse(TckPublisher.isJUDDI());
                 findtmodel(UDDIConstants.CASE_INSENSITIVE_SORT_TMODEL);
         }
 
         @Test
-        @Ignore
         public void UDDI_764caseInsensitiveSortBindingKey() throws Exception {
+                Assume.assumeFalse(TckPublisher.isJUDDI());
                 try {
                         findbinding(UDDIConstants.CASE_INSENSITIVE_SORT_TMODEL);
                         Assert.fail("Unexpected success");
@@ -439,6 +442,7 @@ public class UDDI_070_FindEntityIntegrat
         @Test
         @Ignore
         public void UDDI_764caseInsensitiveSortRelatedBizKey() throws Exception {
+                Assume.assumeFalse(TckPublisher.isJUDDI());
                 findrelated(UDDIConstants.CASE_INSENSITIVE_SORT_TMODEL);
         }
 //</editor-fold>
@@ -526,10 +530,8 @@ public class UDDI_070_FindEntityIntegrat
         @Test
         public void UDDI_764SORT_BY_DATE_ASCSortBinding() throws Exception {
                 findbinding(new String[]{UDDIConstants.SORT_BY_DATE_ASC},
-                        new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
-                
-                
-                
+                     new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+
         }
 
         @Test
@@ -556,7 +558,7 @@ public class UDDI_070_FindEntityIntegrat
         public void UDDI_764SORT_BY_DATE_ASCSortBindingKey() throws Exception {
                 //  findbinding(UDDIConstants.SORT_BY_DATE_ASC_TMODEL);
                 findbinding(new String[]{UDDIConstants.SORT_BY_DATE_ASC_TMODEL},
-                        new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+                     new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
 
         }
 
@@ -585,7 +587,7 @@ public class UDDI_070_FindEntityIntegrat
         @Test
         public void UDDI_764SORT_BY_DATE_DESCSortBinding() throws Exception {
                 findbinding(new String[]{UDDIConstants.SORT_BY_DATE_DESC},
-                        new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+                     new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
                 //(UDDIConstants.SORT_BY_DATE_DESC);
         }
 
@@ -612,7 +614,7 @@ public class UDDI_070_FindEntityIntegrat
         @Test
         public void UDDI_764SORT_BY_DATE_DESCSortBindingKey() throws Exception {
                 findbinding(new String[]{UDDIConstants.SORT_BY_DATE_DESC_TMODEL},
-                        new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+                     new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
         }
 
         @Test
@@ -769,7 +771,7 @@ public class UDDI_070_FindEntityIntegrat
         public void UDDI_764AND_ALL_KEYSSortBinding() throws Exception {
                 //findbinding(UDDIConstants.AND_ALL_KEYS);
                 findbinding(new String[]{UDDIConstants.AND_ALL_KEYS},
-                        new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+                     new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
 
         }
 
@@ -804,7 +806,7 @@ public class UDDI_070_FindEntityIntegrat
 
                 //findbinding(UDDIConstants.AND_ALL_KEYS_TMODEL);
                 findbinding(new String[]{UDDIConstants.AND_ALL_KEYS_TMODEL},
-                        new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+                     new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
 
         }
 
@@ -840,7 +842,7 @@ public class UDDI_070_FindEntityIntegrat
         @Test
         public void UDDI_764BINDING_SUBSETBinding() throws Exception {
                 findbinding(new String[]{UDDIConstants.BINDING_SUBSET},
-                        new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+                     new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
 
                 //        findbinding(new String[]{UDDIConstants.APPROXIMATE_MATCH, UDDIConstants.BINDING_SUBSET});
         }
@@ -868,7 +870,7 @@ public class UDDI_070_FindEntityIntegrat
         @Test
         public void UDDI_764BINDING_SUBSETBindingKey() throws Exception {
                 findbinding(new String[]{UDDIConstants.BINDING_SUBSET_TMODEL},
-                        new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+                     new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
         }
 
         @Test
@@ -897,7 +899,7 @@ public class UDDI_070_FindEntityIntegrat
         public void UDDI_764caseInsensitiveMatchBinding() throws Exception {
                 try {
                         findbinding(new String[]{UDDIConstants.CASE_INSENSITIVE_MATCH},
-                                new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+                             new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
                         Assert.fail("unexpected success");
 
                 } catch (Exception ex) {
@@ -931,7 +933,7 @@ public class UDDI_070_FindEntityIntegrat
                 //findbinding(new String[]{UDDIConstants.APPROXIMATE_MATCH_TMODEL, UDDIConstants.CASE_INSENSITIVE_MATCH_TMODEL});
                 try {
                         findbinding(new String[]{UDDIConstants.CASE_INSENSITIVE_MATCH_TMODEL},
-                                new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+                             new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
                         Assert.fail("unexpected success");
 
                 } catch (Exception ex) {
@@ -964,11 +966,11 @@ public class UDDI_070_FindEntityIntegrat
 
         @Test
         public void UDDI_764CASE_SENSITIVE_MATCHBinding() throws Exception {
-                try{
-                findbinding(new String[]{UDDIConstants.CASE_SENSITIVE_MATCH},
-                        new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
-                                        Assert.fail("unexpected success");
-                }catch (Exception ex){
+                try {
+                        findbinding(new String[]{UDDIConstants.CASE_SENSITIVE_MATCH},
+                             new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+                        Assert.fail("unexpected success");
+                } catch (Exception ex) {
                         logger.info("Expected failure: " + ex.getMessage());
                         logger.debug("Expected failure: " + ex.getMessage(), ex);
                 }
@@ -997,11 +999,11 @@ public class UDDI_070_FindEntityIntegrat
         @Test
         public void UDDI_764CASE_SENSITIVE_MATCHBindingKey() throws Exception {
                 //findbinding(new String[]{UDDIConstants.APPROXIMATE_MATCH_TMODEL, UDDIConstants.CASE_SENSITIVE_MATCH_TMODEL});
-                try{
-                findbinding(new String[]{UDDIConstants.CASE_SENSITIVE_MATCH_TMODEL},
-                        new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
-                                        Assert.fail("unexpected success");
-                }catch (Exception ex){
+                try {
+                        findbinding(new String[]{UDDIConstants.CASE_SENSITIVE_MATCH_TMODEL},
+                             new KeyedReference[]{new KeyedReference(UDDIConstants.TRANSPORT_HTTP,
"test", "test")});
+                        Assert.fail("unexpected success");
+                } catch (Exception ex) {
                         logger.info("Expected failure: " + ex.getMessage());
                         logger.debug("Expected failure: " + ex.getMessage(), ex);
                 }
@@ -2265,4 +2267,65 @@ public class UDDI_070_FindEntityIntegrat
 
         //</editor-fold>
         //
+       
+        //<editor-fold defaultstate="collapsed" desc="Find qualifiers not recognized by
a node will return the error E_unsupported. ">
+        @Test
+        public void UDDI_785UNSUPPORTED_FIND_QUALIFIER_Business() {
+                try {
+                        findbuinsess(UUID.randomUUID().toString());
+                        Assert.fail("Unexpected success");
+                } catch (Exception ex) {
+                        logger.info("Expected failure: " + ex.getMessage());
+                        logger.debug("Expected failure: " + ex.getMessage(), ex);
+                }
+        }
+
+        @Test
+        public void UDDI_785UNSUPPORTED_FIND_QUALIFIER_Service() throws Exception {
+                try {
+                        findservice(UUID.randomUUID().toString());
+                        Assert.fail("Unexpected success");
+                } catch (Exception ex) {
+                        logger.info("Expected failure: " + ex.getMessage());
+                        logger.debug("Expected failure: " + ex.getMessage(), ex);
+                }
+        }
+
+        @Test
+        public void UDDI_785UNSUPPORTED_FIND_QUALIFIER_TModel() {
+                try {
+                        findtmodel(UUID.randomUUID().toString());
+                        Assert.fail("Unexpected success");
+                } catch (Exception ex) {
+                        logger.info("Expected failure: " + ex.getMessage());
+                        logger.debug("Expected failure: " + ex.getMessage(), ex);
+                }
+        }
+
+        @Test
+        public void UDDI_785UNSUPPORTED_FIND_QUALIFIER_Binding() {
+                try {
+                        findbinding(UUID.randomUUID().toString());
+                        Assert.fail("Unexpected success");
+                } catch (Exception ex) {
+                        logger.info("Expected failure: " + ex.getMessage());
+                        logger.debug("Expected failure: " + ex.getMessage(), ex);
+                }
+        }
+
+        @Test
+        public void UDDI_785UNSUPPORTED_FIND_QUALIFIER_RelatedBiz() {
+                try {
+                        findrelated(UUID.randomUUID().toString());
+                        Assert.fail("Unexpected success");
+                } catch (Exception ex) {
+                        logger.info("Expected failure: " + ex.getMessage());
+                        logger.debug("Expected failure: " + ex.getMessage(), ex);
+                }
+        }
+
+//</editor-fold>
+        
+         //TODO test cases for mixed case find qualifiers
+        //"Registries MUST support both forms, and MUST accept the find qualifiers case-insensitively.
"
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org


Mime
View raw message