Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcos Henrich <marcos.henrich@xamarin.com>2016-01-30 14:58:12 +0300
committerMarcos Henrich <marcos.henrich@xamarin.com>2016-02-16 14:56:02 +0300
commita86179ebb1182ba671834aebb063634607d79883 (patch)
tree6ae93b7c4e6b5e4a5f7ef6a66d70e82f1ede2028 /mcs/class/System.Web.Services
parent35889d4bc2be1f5e7a68623e3fc33cf24080c2ee (diff)
[System.Web.Services] Test DiscoveryClientProtocol
Covers #36116
Diffstat (limited to 'mcs/class/System.Web.Services')
-rw-r--r--mcs/class/System.Web.Services/System.Web.Services_test.dll.sources1
-rw-r--r--mcs/class/System.Web.Services/Test/System.Web.Services.Discovery/DiscoveryClientProtocolTest.cs45
2 files changed, 46 insertions, 0 deletions
diff --git a/mcs/class/System.Web.Services/System.Web.Services_test.dll.sources b/mcs/class/System.Web.Services/System.Web.Services_test.dll.sources
index 1d055d9cdaf..8d6ab724f11 100644
--- a/mcs/class/System.Web.Services/System.Web.Services_test.dll.sources
+++ b/mcs/class/System.Web.Services/System.Web.Services_test.dll.sources
@@ -10,6 +10,7 @@ System.Web.Services.Configuration/WsdlHelpGeneratorElementTest.cs
System.Web.Services.Configuration/WsiProfilesElementTest.cs
System.Web.Services.Configuration/XmlFormatExtensionAttributeTest.cs
System.Web.Services.Discovery/ContractReferenceTest.cs
+System.Web.Services.Discovery/DiscoveryClientProtocolTest.cs
System.Web.Services.Description/BindingCollectionTest.cs
System.Web.Services.Description/DocumentableItemTest.cs
System.Web.Services.Description/TypesTest.cs
diff --git a/mcs/class/System.Web.Services/Test/System.Web.Services.Discovery/DiscoveryClientProtocolTest.cs b/mcs/class/System.Web.Services/Test/System.Web.Services.Discovery/DiscoveryClientProtocolTest.cs
new file mode 100644
index 00000000000..4a12ce5b1ea
--- /dev/null
+++ b/mcs/class/System.Web.Services/Test/System.Web.Services.Discovery/DiscoveryClientProtocolTest.cs
@@ -0,0 +1,45 @@
+//
+// MonoTests.System.Web.Services.Discovery.DiscoveryClientProtocolTest.cs
+//
+// Author:
+// Marcos Henrich (marcos.henrich@xamarin.com)
+//
+// Copyright (C) Xamarin Inc. 2016
+//
+
+using NUnit.Framework;
+using System;
+using System.IO;
+using System.Web.Services.Discovery;
+
+namespace MonoTests.System.Web.Services.Discovery {
+
+ [TestFixture]
+ public class DiscoveryClientProtocolTest {
+
+ [Test] // Covers #36116
+ [Category ("InetAccess")]
+ public void ReadWriteTest ()
+ {
+ string directory = Path.Combine (Path.GetTempPath (), Path.GetRandomFileName ());
+ Directory.CreateDirectory (directory);
+ try {
+ string url = "http://www.w3schools.com/WebServices/TempConvert.asmx";
+ var p1 = new DiscoveryClientProtocol ();
+ p1.DiscoverAny (url);
+ p1.ResolveAll ();
+
+ p1.WriteAll (directory, "Reference.map");
+
+ var p2 = new DiscoveryClientProtocol ();
+ var results = p2.ReadAll (Path.Combine (directory, "Reference.map"));
+
+ Assert.AreEqual (2, results.Count);
+ Assert.AreEqual ("TempConvert.disco", results [0].Filename);
+ Assert.AreEqual ("TempConvert.wsdl", results [1].Filename);
+ } finally {
+ Directory.Delete (directory, true);
+ }
+ }
+ }
+}