juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alexo...@apache.org
Subject [15/26] juddi git commit: JUDDI-914 done
Date Wed, 14 Jan 2015 02:29:26 GMT
http://git-wip-us.apache.org/repos/asf/juddi/blob/0833b028/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/TModelInstanceDetailsComparatorTest.cs
----------------------------------------------------------------------
diff --git a/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/TModelInstanceDetailsComparatorTest.cs b/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/TModelInstanceDetailsComparatorTest.cs
index a950af6..eba892b 100644
--- a/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/TModelInstanceDetailsComparatorTest.cs
+++ b/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/TModelInstanceDetailsComparatorTest.cs
@@ -1,457 +1,476 @@
-using NUnit.Framework;
-using org.apache.juddi.v3.client.util;
-using org.uddi.apiv3;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace juddi_client.net.test.org.apache.juddi.client.test
-{
-    [TestFixture]
-    public class TModelInstanceDetailsComparatorTest
-    {
-
-        /**
- * Test of compare method, of class TModelInstanceDetailsComparator.
- */
-        [Test]
-        [ExpectedException(typeof(ArgumentNullException))]
-        public void testCompareToNulls()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls");
-            tModelInstanceInfo[] lhs = null;
-            tModelInstanceInfo[] rhs = null;
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator(null, true, false, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void testCompareToNulls2()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls2");
-            tModelInstanceInfo[] lhs = null;
-            tModelInstanceInfo[] rhs = null;
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, true, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void testCompareToNulls3()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls3");
-            tModelInstanceInfo[] lhs = null;
-            tModelInstanceInfo[] rhs = null;
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, true);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void testCompareToNulls4()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls4");
-            tModelInstanceInfo[] lhs = null;
-            tModelInstanceInfo[] rhs = null;
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, true);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void testCompareToNulls5()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls5");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void testCompareToNulls6()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls6");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void testCompareToNulls7()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls7");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentNullException))]
-        public void testCompareToNulls8()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls8");
-            tModelInstanceInfo[] lhs = null;
-            tModelInstanceInfo[] rhs = null;
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void testCompareToNotFound()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare notfound");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-            lhs[0].tModelKey = ("asd");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-            rhs[0].tModelKey = ("asd");
-            rhs[0].instanceDetails = new instanceDetails();
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void testCompareToNoData()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNoData");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(ArgumentOutOfRangeException))]
-        public void testCompareToLHSNull()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToLHSNull");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-
-            rhs[0].instanceDetails.instanceParms = ("xyz");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(System.ArgumentOutOfRangeException))]
-
-        public void testCompareToRHSNull()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToRHSNull");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("xyz");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            //rhs[0].instanceDetails.instanceParms=("xyz");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        [ExpectedException(typeof(FormatException))]
-        public void testCompareToNotNumberData()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNotNumberData");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("xyz");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("xyz");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-        }
-
-        [Test]
-        public void testCompareToNumberDataEquals()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNumberDataEquals");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("3.14");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("3.14");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-            int expResult = 0;
-            int result = instance.compare(lhs, rhs);
-            Assert.AreEqual(expResult, result, "result " + result);
-        }
-
-        [Test]
-        public void testCompareToNumberDataGT()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNumberDataGT");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("3.15");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("3.14");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-
-            int result = instance.compare(lhs, rhs);
-            Assert.True(result > 0, "result " + result);
-        }
-
-        [Test]
-        public void testCompareToNumberDataLT()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNumberDataLT");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("3.10");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("3.14");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
-
-            int result = instance.compare(lhs, rhs);
-            Assert.True(result < 0, "result " + result);
-        }
-
-        [Test]
-        [ExpectedException(typeof(System.FormatException))]
-        public void testCompareToDate()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDate");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("asdasd");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("asdasdasd");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);
-
-            int result = instance.compare(lhs, rhs);
-            //Assert.assertTrue("result " + result,result < 0);
-
-        }
-
-        [Test]
-        public void testCompareToDateGT()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDateGT");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("2006-05-30T09:30:10-06:00");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("2004-05-30T09:30:10-06:00");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);
-
-            int result = instance.compare(lhs, rhs);
-            Assert.True(result > 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
-                    rhs[0].instanceDetails.instanceParms + " " +
-                    result);
-
-        }
-
-        [Test]
-        public void testCompareToDateLT()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDateLT");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("2002-05-30T09:30:10-06:00");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("2005-05-30T09:30:10-06:00");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);
-
-            int result = instance.compare(lhs, rhs);
-            Assert.True(result < 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
-                    rhs[0].instanceDetails.instanceParms + " " + result);
-
-        }
-
-        [Test]
-        public void testCompareToDateEQ()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDateEQ");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("2002-05-30T09:30:10-06:00");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("2002-05-30T09:30:10-06:00");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);
-
-            int result = instance.compare(lhs, rhs);
-            Assert.True(result == 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
-                    rhs[0].instanceDetails.instanceParms + " " +
-                    result);
-
-        }
-
-        [Test]
-        [ExpectedException(typeof(System.FormatException))]
-        public void testCompareToDurationInvalid()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationInvalid");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("asdasd");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("asdasd");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, false, true);
-            int result = instance.compare(lhs, rhs);
-            Assert.True(result == 0, "result " + result);
-        }
-
-        [Test]
-        public void testCompareToDurationLT()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationLT");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("P1Y");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("P3Y");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, false, true);
-            int result = instance.compare(lhs, rhs);
-            Assert.True(result < 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
-                    rhs[0].instanceDetails.instanceParms + " " +
-                    result);
-        }
-
-        [Test]
-        public void testCompareToDurationGT()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationGT");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("P5Y");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("P2Y");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, false, true);
-            int result = instance.compare(lhs, rhs);
-            Assert.True(result > 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
-                    rhs[0].instanceDetails.instanceParms + " " +
-                    result);
-        }
-
-        [Test]
-        public void testCompareToDurationEQ()
-        {
-            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationEQ");
-            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-            lhs[0].tModelKey = ("hi");
-            lhs[0].instanceDetails = new instanceDetails();
-            lhs[0].instanceDetails.instanceParms = ("P5Y");
-            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
-
-
-            rhs[0].tModelKey = ("hi");
-            rhs[0].instanceDetails = new instanceDetails();
-            rhs[0].instanceDetails.instanceParms = ("P5Y");
-            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, false, true);
-            int result = instance.compare(lhs, rhs);
-            Assert.True(result == 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
-                     lhs[0].instanceDetails.instanceParms + " " +
-                    result);
-        }
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+using NUnit.Framework;
+using org.apache.juddi.v3.client.util;
+using org.uddi.apiv3;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace juddi_client.net.test.org.apache.juddi.client.test
+{
+    [TestFixture]
+    public class TModelInstanceDetailsComparatorTest
+    {
+
+        /**
+ * Test of compare method, of class TModelInstanceDetailsComparator.
+ */
+        [Test]
+        [ExpectedException(typeof(ArgumentNullException))]
+        public void testCompareToNulls()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls");
+            tModelInstanceInfo[] lhs = null;
+            tModelInstanceInfo[] rhs = null;
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator(null, true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls2()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls2");
+            tModelInstanceInfo[] lhs = null;
+            tModelInstanceInfo[] rhs = null;
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, true, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls3()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls3");
+            tModelInstanceInfo[] lhs = null;
+            tModelInstanceInfo[] rhs = null;
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, true);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls4()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls4");
+            tModelInstanceInfo[] lhs = null;
+            tModelInstanceInfo[] rhs = null;
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, true);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls5()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls5");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls6()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls6");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNulls7()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls7");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentNullException))]
+        public void testCompareToNulls8()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare nulls8");
+            tModelInstanceInfo[] lhs = null;
+            tModelInstanceInfo[] rhs = null;
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNotFound()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare notfound");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+            lhs[0].tModelKey = ("asd");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+            rhs[0].tModelKey = ("asd");
+            rhs[0].instanceDetails = new instanceDetails();
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToNoData()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNoData");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(ArgumentOutOfRangeException))]
+        public void testCompareToLHSNull()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToLHSNull");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+
+            rhs[0].instanceDetails.instanceParms = ("xyz");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(System.ArgumentOutOfRangeException))]
+
+        public void testCompareToRHSNull()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToRHSNull");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("xyz");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            //rhs[0].instanceDetails.instanceParms=("xyz");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        [ExpectedException(typeof(FormatException))]
+        public void testCompareToNotNumberData()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNotNumberData");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("xyz");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("xyz");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+        }
+
+        [Test]
+        public void testCompareToNumberDataEquals()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNumberDataEquals");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("3.14");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("3.14");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+            int expResult = 0;
+            int result = instance.compare(lhs, rhs);
+            Assert.AreEqual(expResult, result, "result " + result);
+        }
+
+        [Test]
+        public void testCompareToNumberDataGT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNumberDataGT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("3.15");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("3.14");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result > 0, "result " + result);
+        }
+
+        [Test]
+        public void testCompareToNumberDataLT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToNumberDataLT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("3.10");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("3.14");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", true, false, false);
+
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result < 0, "result " + result);
+        }
+
+        [Test]
+        [ExpectedException(typeof(System.FormatException))]
+        public void testCompareToDate()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDate");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("asdasd");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("asdasdasd");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);
+
+            int result = instance.compare(lhs, rhs);
+            //Assert.assertTrue("result " + result,result < 0);
+
+        }
+
+        [Test]
+        public void testCompareToDateGT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDateGT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("2006-05-30T09:30:10-06:00");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("2004-05-30T09:30:10-06:00");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);
+
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result > 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
+                    rhs[0].instanceDetails.instanceParms + " " +
+                    result);
+
+        }
+
+        [Test]
+        public void testCompareToDateLT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDateLT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("2002-05-30T09:30:10-06:00");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("2005-05-30T09:30:10-06:00");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);
+
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result < 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
+                    rhs[0].instanceDetails.instanceParms + " " + result);
+
+        }
+
+        [Test]
+        public void testCompareToDateEQ()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDateEQ");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("2002-05-30T09:30:10-06:00");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("2002-05-30T09:30:10-06:00");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, true, false);
+
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result == 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
+                    rhs[0].instanceDetails.instanceParms + " " +
+                    result);
+
+        }
+
+        [Test]
+        [ExpectedException(typeof(System.FormatException))]
+        public void testCompareToDurationInvalid()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationInvalid");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("asdasd");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("asdasd");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, false, true);
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result == 0, "result " + result);
+        }
+
+        [Test]
+        public void testCompareToDurationLT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationLT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("P1Y");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("P3Y");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, false, true);
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result < 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
+                    rhs[0].instanceDetails.instanceParms + " " +
+                    result);
+        }
+
+        [Test]
+        public void testCompareToDurationGT()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationGT");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("P5Y");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("P2Y");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, false, true);
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result > 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
+                    rhs[0].instanceDetails.instanceParms + " " +
+                    result);
+        }
+
+        [Test]
+        public void testCompareToDurationEQ()
+        {
+            System.Console.Out.WriteLine("TModelInstanceDetailsComparator.compare testCompareToDurationEQ");
+            tModelInstanceInfo[] lhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+            lhs[0].tModelKey = ("hi");
+            lhs[0].instanceDetails = new instanceDetails();
+            lhs[0].instanceDetails.instanceParms = ("P5Y");
+            tModelInstanceInfo[] rhs = new tModelInstanceInfo[1] { new tModelInstanceInfo() };
+
+
+            rhs[0].tModelKey = ("hi");
+            rhs[0].instanceDetails = new instanceDetails();
+            rhs[0].instanceDetails.instanceParms = ("P5Y");
+            TModelInstanceDetailsComparator instance = new TModelInstanceDetailsComparator("hi", false, false, true);
+            int result = instance.compare(lhs, rhs);
+            Assert.True(result == 0, "result " + lhs[0].instanceDetails.instanceParms + " compare to " +
+                     lhs[0].instanceDetails.instanceParms + " " +
+                    result);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/0833b028/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/WSDL2UDDITest.cs
----------------------------------------------------------------------
diff --git a/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/WSDL2UDDITest.cs b/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/WSDL2UDDITest.cs
index 423cda0..d16c6fb 100644
--- a/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/WSDL2UDDITest.cs
+++ b/juddi-client.net/juddi-client.net.test/org.apache.juddi.client.test/WSDL2UDDITest.cs
@@ -1,170 +1,189 @@
-using net.java.dev.wadl;
-using NUnit.Framework;
-using org.apache.juddi.v3.client;
-using org.apache.juddi.v3.client.config;
-using org.apache.juddi.v3.client.mapping;
-using org.apache.juddi.v3.client.transport;
-using org.uddi.apiv3;
-using org.xmlsoap.schemas.easyWsdl;
-using System;
-using System.Collections.Generic;
-using System.IO;
-using System.Text;
-
-namespace juddi_client.net.test
-{
-    [TestFixture]
-    public class WSDL2UDDITest
-    {
-        string path = "";
-        public WSDL2UDDITest()
-        {
-            Console.Out.WriteLine(Directory.GetCurrentDirectory());
-            path = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "resources";
-            if (!Directory.Exists(path))
-            {
-                path = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + "resources";
-                Console.Out.WriteLine(path);
-            }
-            if (!Directory.Exists(path))
-            {
-                path = Environment.GetEnvironmentVariable("JUDDI_TEST_RES");
-                Console.Out.WriteLine(path);
-            }
-            if (path == null || !Directory.Exists(path))
-            {
-                path = null;
-                Console.Out.WriteLine("uh oh, I can't find the resources directory, override with the environment variable JUDDI_TEST_RES=<path>");
-            }
-        }
-
-        [Test]
-        public void juddiapiflattenedTest()
-        {
-            Assume.That(path != null);
-            runTest(path + Path.DirectorySeparatorChar + "juddi-api-flattened.wsdl");
-        }
-
-        [Test]
-        public void juddiapiflattenedTestLongDescriptions()
-        {
-            Assume.That(path != null);
-            runTest(path + Path.DirectorySeparatorChar + "sample_1.wsdl");
-        }
-
-
-        [Test]
-        public void ReadWSDLTest1()
-        {
-            ReadWSDL wsi = new ReadWSDL();
-            try
-            {
-                tDefinitions wsdlDefinition = wsi.readWSDL(null);
-            }
-            catch (ArgumentNullException)
-            {
-
-            }
-        }
-
-        [Test]
-        public void WSDL2UDDITest2()
-        {
-            try
-            {
-                WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, null, null);
-            }
-            catch (ArgumentNullException)
-            {
-
-            }
-        }
-
-
-        void runTest(String pathAndFile)
-        {
-            Assume.That(File.Exists(pathAndFile));
-
-
-            ReadWSDL wsi = new ReadWSDL();
-            tDefinitions wsdlDefinition = wsi.readWSDL(
-               pathAndFile
-                );
-            Properties properties1 = new Properties();
-            properties1.put("keyDomain", "my.key.domain");
-            WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizer(), properties1);
-            Assert.NotNull(wsdl2UDDI);
-
-            Dictionary<QName, tPortType> portTypes1 = (Dictionary<QName, tPortType>)wsdlDefinition.getAllPortTypes();
-            Assert.NotNull(portTypes1);
-            Assert.True(portTypes1.Count > 0);
-            List<tModel> portTypeTModels1 = wsdl2UDDI.createWSDLPortTypeTModels(pathAndFile, portTypes1);
-
-            Assert.NotNull(portTypeTModels1);
-            Assert.True(portTypeTModels1.Count > 0);
-
-
-            Dictionary<QName, tBinding> allBindings1 = wsdlDefinition.getAllBindings();
-            Assert.NotNull(allBindings1);
-            Assert.True(allBindings1.Count > 0);
-            List<tModel> createWSDLBindingTModels1 = wsdl2UDDI.createWSDLBindingTModels(pathAndFile, allBindings1);
-            Assert.NotNull(createWSDLBindingTModels1);
-            Assert.True(createWSDLBindingTModels1.Count > 0);
-
-            businessService[] businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinition);
-
-            Assert.NotNull(businessServices);
-            Assert.True(businessServices.Length > 0);
-            for (int i = 0; i < businessServices.Length; i++)
-            {
-                foreach (description d in businessServices[i].description)
-                {
-                    if (d.lang != null)
-                        Assert.True(d.lang.Length <= UDDIConstants.MAX_xml_lang_length);
-                    if (d.Value != null)
-                        Assert.True(d.Value.Length <= UDDIConstants.MAX_description_length);
-                }
-                foreach (bindingTemplate bt in businessServices[i].bindingTemplates)
-                {
-                    
-
-
-                    Assert.NotNull(bt);
-                    Assert.NotNull(bt.bindingKey);
-                    Assert.NotNull(bt.Item);
-                    Assert.NotNull(bt.serviceKey);
-                    Assert.True(bt.Item is accessPoint);
-                    Assert.NotNull(((accessPoint)bt.Item).useType);
-                    Assert.NotNull(((accessPoint)bt.Item).Value);
-
-                    foreach (description d in bt.description)
-                    {
-                        if (d.lang != null)
-                            Assert.True(d.lang.Length <= UDDIConstants.MAX_xml_lang_length);
-                        if (d.Value != null)
-                            Assert.True(d.Value.Length <= UDDIConstants.MAX_description_length);
-                    }
-
-                    foreach (tModelInstanceInfo tm in bt.tModelInstanceDetails)
-                    {
-                        foreach (description d in tm.description)
-                        {
-                            if (d.lang != null)
-                                Assert.True(d.lang.Length <= UDDIConstants.MAX_xml_lang_length);
-                            if (d.Value != null)
-                                Assert.True(d.Value.Length <= UDDIConstants.MAX_description_length);
-                        }
-                    }
-
-                }
-                Assert.True(businessServices[i].bindingTemplates.Length > 0);
-                Assert.NotNull(businessServices[i].description);
-                Assert.True(businessServices[i].description.Length > 0);
-                Assert.NotNull(businessServices[i].serviceKey);
-            }
-
-
-        }
-
-    }
-}
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+using net.java.dev.wadl;
+using NUnit.Framework;
+using org.apache.juddi.v3.client;
+using org.apache.juddi.v3.client.config;
+using org.apache.juddi.v3.client.mapping;
+using org.apache.juddi.v3.client.transport;
+using org.uddi.apiv3;
+using org.xmlsoap.schemas.easyWsdl;
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Text;
+
+namespace juddi_client.net.test
+{
+    [TestFixture]
+    public class WSDL2UDDITest
+    {
+        string path = "";
+        public WSDL2UDDITest()
+        {
+            Console.Out.WriteLine(Directory.GetCurrentDirectory());
+            path = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + "resources";
+            if (!Directory.Exists(path))
+            {
+                path = Directory.GetCurrentDirectory() + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + ".." + Path.DirectorySeparatorChar + "resources";
+                Console.Out.WriteLine(path);
+            }
+            if (!Directory.Exists(path))
+            {
+                path = Environment.GetEnvironmentVariable("JUDDI_TEST_RES");
+                Console.Out.WriteLine(path);
+            }
+            if (path == null || !Directory.Exists(path))
+            {
+                path = null;
+                Console.Out.WriteLine("uh oh, I can't find the resources directory, override with the environment variable JUDDI_TEST_RES=<path>");
+            }
+        }
+
+        [Test]
+        public void juddiapiflattenedTest()
+        {
+            Assume.That(path != null);
+            runTest(path + Path.DirectorySeparatorChar + "juddi-api-flattened.wsdl");
+        }
+
+        [Test]
+        public void juddiapiflattenedTestLongDescriptions()
+        {
+            Assume.That(path != null);
+            runTest(path + Path.DirectorySeparatorChar + "sample_1.wsdl");
+        }
+
+
+        [Test]
+        public void ReadWSDLTest1()
+        {
+            ReadWSDL wsi = new ReadWSDL();
+            try
+            {
+                tDefinitions wsdlDefinition = wsi.readWSDL(null);
+            }
+            catch (ArgumentNullException)
+            {
+
+            }
+        }
+
+        [Test]
+        public void WSDL2UDDITest2()
+        {
+            try
+            {
+                WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, null, null);
+            }
+            catch (ArgumentNullException)
+            {
+
+            }
+        }
+
+
+        void runTest(String pathAndFile)
+        {
+            Assume.That(File.Exists(pathAndFile));
+
+
+            ReadWSDL wsi = new ReadWSDL();
+            tDefinitions wsdlDefinition = wsi.readWSDL(
+               pathAndFile
+                );
+            Properties properties1 = new Properties();
+            properties1.put("keyDomain", "my.key.domain");
+            WSDL2UDDI wsdl2UDDI = new WSDL2UDDI(null, new URLLocalizer(), properties1);
+            Assert.NotNull(wsdl2UDDI);
+
+            Dictionary<QName, tPortType> portTypes1 = (Dictionary<QName, tPortType>)wsdlDefinition.getAllPortTypes();
+            Assert.NotNull(portTypes1);
+            Assert.True(portTypes1.Count > 0);
+            List<tModel> portTypeTModels1 = wsdl2UDDI.createWSDLPortTypeTModels(pathAndFile, portTypes1);
+
+            Assert.NotNull(portTypeTModels1);
+            Assert.True(portTypeTModels1.Count > 0);
+
+
+            Dictionary<QName, tBinding> allBindings1 = wsdlDefinition.getAllBindings();
+            Assert.NotNull(allBindings1);
+            Assert.True(allBindings1.Count > 0);
+            List<tModel> createWSDLBindingTModels1 = wsdl2UDDI.createWSDLBindingTModels(pathAndFile, allBindings1);
+            Assert.NotNull(createWSDLBindingTModels1);
+            Assert.True(createWSDLBindingTModels1.Count > 0);
+
+            businessService[] businessServices = wsdl2UDDI.createBusinessServices(wsdlDefinition);
+
+            Assert.NotNull(businessServices);
+            Assert.True(businessServices.Length > 0);
+            for (int i = 0; i < businessServices.Length; i++)
+            {
+                foreach (description d in businessServices[i].description)
+                {
+                    if (d.lang != null)
+                        Assert.True(d.lang.Length <= UDDIConstants.MAX_xml_lang_length);
+                    if (d.Value != null)
+                        Assert.True(d.Value.Length <= UDDIConstants.MAX_description_length);
+                }
+                foreach (bindingTemplate bt in businessServices[i].bindingTemplates)
+                {
+                    
+
+
+                    Assert.NotNull(bt);
+                    Assert.NotNull(bt.bindingKey);
+                    Assert.NotNull(bt.Item);
+                    Assert.NotNull(bt.serviceKey);
+                    Assert.True(bt.Item is accessPoint);
+                    Assert.NotNull(((accessPoint)bt.Item).useType);
+                    Assert.NotNull(((accessPoint)bt.Item).Value);
+
+                    foreach (description d in bt.description)
+                    {
+                        if (d.lang != null)
+                            Assert.True(d.lang.Length <= UDDIConstants.MAX_xml_lang_length);
+                        if (d.Value != null)
+                            Assert.True(d.Value.Length <= UDDIConstants.MAX_description_length);
+                    }
+
+                    foreach (tModelInstanceInfo tm in bt.tModelInstanceDetails)
+                    {
+                        foreach (description d in tm.description)
+                        {
+                            if (d.lang != null)
+                                Assert.True(d.lang.Length <= UDDIConstants.MAX_xml_lang_length);
+                            if (d.Value != null)
+                                Assert.True(d.Value.Length <= UDDIConstants.MAX_description_length);
+                        }
+                    }
+
+                }
+                Assert.True(businessServices[i].bindingTemplates.Length > 0);
+                Assert.NotNull(businessServices[i].description);
+                Assert.True(businessServices[i].description.Length > 0);
+                Assert.NotNull(businessServices[i].serviceKey);
+            }
+
+
+        }
+
+    }
+}

http://git-wip-us.apache.org/repos/asf/juddi/blob/0833b028/juddi-client.net/juddi-client.net.test/packages.config
----------------------------------------------------------------------
diff --git a/juddi-client.net/juddi-client.net.test/packages.config b/juddi-client.net/juddi-client.net.test/packages.config
index b1aa629..2ecb3c0 100644
--- a/juddi-client.net/juddi-client.net.test/packages.config
+++ b/juddi-client.net/juddi-client.net.test/packages.config
@@ -1,4 +1,24 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
-  <package id="NUnit" version="2.6.2" targetFramework="net35" />
-</packages>
\ No newline at end of file
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<packages>
+  <package id="NUnit" version="2.6.2" targetFramework="net35" />
+</packages>

http://git-wip-us.apache.org/repos/asf/juddi/blob/0833b028/juddi-client.net/juddi-client.net.test/resources/cxf.wadl
----------------------------------------------------------------------
diff --git a/juddi-client.net/juddi-client.net.test/resources/cxf.wadl b/juddi-client.net/juddi-client.net.test/resources/cxf.wadl
index f2df539..b350def 100644
--- a/juddi-client.net/juddi-client.net.test/resources/cxf.wadl
+++ b/juddi-client.net/juddi-client.net.test/resources/cxf.wadl
@@ -1,3 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
 <application xmlns="http://wadl.dev.java.net/2009/02" xmlns:ns="http://superbooks">
  <grammars>
   <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 

http://git-wip-us.apache.org/repos/asf/juddi/blob/0833b028/juddi-client.net/juddi-client.net.test/resources/juddi-api-flattened.wsdl
----------------------------------------------------------------------
diff --git a/juddi-client.net/juddi-client.net.test/resources/juddi-api-flattened.wsdl b/juddi-client.net/juddi-client.net.test/resources/juddi-api-flattened.wsdl
index 6b6e0ac..afba715 100644
--- a/juddi-client.net/juddi-client.net.test/resources/juddi-api-flattened.wsdl
+++ b/juddi-client.net/juddi-client.net.test/resources/juddi-api-flattened.wsdl
@@ -1,3 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
 <?xml version='1.0' encoding='UTF-8'?><wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="urn:juddi-apache-org:v3_service" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:ns2="http://schemas.xmlsoap.org/soap/http" xmlns:ns1="urn:juddi-apache-org:api_v3" name="JUDDIApiService" targetNamespace="urn:juddi-apache-org:v3_service">
   <wsdl:types>
 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="urn:uddi-org:sub_v3" xmlns:ns1="urn:uddi-org:api_v3" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="urn:uddi-org:sub_v3">

http://git-wip-us.apache.org/repos/asf/juddi/blob/0833b028/juddi-client.net/juddi-client.net.test/resources/sample.wadl
----------------------------------------------------------------------
diff --git a/juddi-client.net/juddi-client.net.test/resources/sample.wadl b/juddi-client.net/juddi-client.net.test/resources/sample.wadl
index 4e5e6a9..dad4196 100644
--- a/juddi-client.net/juddi-client.net.test/resources/sample.wadl
+++ b/juddi-client.net/juddi-client.net.test/resources/sample.wadl
@@ -1,3 +1,23 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
 <application xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
   xsi:schemaLocation="http://wadl.dev.java.net/2009/02 wadl.xsd" 
   xmlns:tns="urn:yahoo:yn" 

http://git-wip-us.apache.org/repos/asf/juddi/blob/0833b028/juddi-client.net/juddi-client.net.test/resources/sample_1.wsdl
----------------------------------------------------------------------
diff --git a/juddi-client.net/juddi-client.net.test/resources/sample_1.wsdl b/juddi-client.net/juddi-client.net.test/resources/sample_1.wsdl
index da41ee6..3ecda97 100644
--- a/juddi-client.net/juddi-client.net.test/resources/sample_1.wsdl
+++ b/juddi-client.net/juddi-client.net.test/resources/sample_1.wsdl
@@ -1,4 +1,23 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
 <definitions name="StockQuote" targetNamespace="http://example.com/stockquote/"
 	xmlns:tns="http://example.com/stockquote/" xmlns:xsd1="http://example.com/stockquote/schema/"
 	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">

http://git-wip-us.apache.org/repos/asf/juddi/blob/0833b028/juddi-client.net/juddi-client.net.test/uddi.xml
----------------------------------------------------------------------
diff --git a/juddi-client.net/juddi-client.net.test/uddi.xml b/juddi-client.net/juddi-client.net.test/uddi.xml
index 61616b3..50ab0c3 100644
--- a/juddi-client.net/juddi-client.net.test/uddi.xml
+++ b/juddi-client.net/juddi-client.net.test/uddi.xml
@@ -1,4 +1,24 @@
 <?xml version="1.0" encoding="ISO-8859-1" ?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
 <uddi xmlns="urn:juddi-apache-org:v3_client" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:juddi-apache-org:v3_client ..\..\juddi-client\src\main\resources\xsd\uddi-client.xsd">
   <reloadDelay>5000</reloadDelay>
   <client name="test-client">
@@ -89,4 +109,4 @@
       <IgnoreSSLErrors>false</IgnoreSSLErrors>
     </XtoWsdl>
   </client>
-</uddi>
\ No newline at end of file
+</uddi>


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


Mime
View raw message