9 changed files with 67 additions and 62 deletions
@ -1,58 +1,57 @@ |
|||||||
#warning
|
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||||
//// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
||||||
//// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
|
||||||
//
|
using ICSharpCode.SharpDevelop; |
||||||
//using ICSharpCode.SharpDevelop;
|
using SD = ICSharpCode.SharpDevelop.Gui; |
||||||
//using SD = ICSharpCode.SharpDevelop.Gui;
|
using ICSharpCode.SharpDevelop.Project; |
||||||
//using ICSharpCode.SharpDevelop.Project;
|
using NUnit.Framework; |
||||||
//using NUnit.Framework;
|
using System; |
||||||
//using System;
|
using System.IO; |
||||||
//using System.IO;
|
using System.Collections.Generic; |
||||||
//using System.Collections.Generic;
|
using System.Web.Services.Description; |
||||||
//using System.Web.Services.Description;
|
using System.Web.Services.Discovery; |
||||||
//using System.Web.Services.Discovery;
|
|
||||||
//
|
namespace ICSharpCode.SharpDevelop.Tests.WebReferences |
||||||
//namespace ICSharpCode.SharpDevelop.Tests.WebReferences
|
{ |
||||||
//{
|
/// <summary>
|
||||||
// /// <summary>
|
/// Tests that an exception is thrown if an unsupported project language
|
||||||
// /// Tests that an exception is thrown if an unsupported project language
|
/// is used with the web reference
|
||||||
// /// is used with the web reference
|
/// </summary>
|
||||||
// /// </summary>
|
[TestFixture] |
||||||
// [TestFixture]
|
public class UnsupportedLanguageTest : SDTestFixtureBase |
||||||
// public class UnsupportedLanguageTest
|
{ |
||||||
// {
|
Gui.WebReference webReference; |
||||||
// SD.WebReference webReference;
|
DiscoveryClientProtocol protocol; |
||||||
// DiscoveryClientProtocol protocol;
|
FileProjectItem proxyFileProjectItem; |
||||||
// FileProjectItem proxyFileProjectItem;
|
MSBuildBasedProject project; |
||||||
// MSBuildBasedProject project;
|
|
||||||
//
|
string name = "localhost"; |
||||||
// string name = "localhost";
|
string proxyNamespace = "WebReferenceNamespace"; |
||||||
// string proxyNamespace = "WebReferenceNamespace";
|
string updateFromUrl = "http://localhost/test.asmx"; |
||||||
// string updateFromUrl = "http://localhost/test.asmx";
|
|
||||||
//
|
[Test] |
||||||
// [Test]
|
[ExpectedException(typeof(NotSupportedException))] |
||||||
// [ExpectedException(typeof(NotSupportedException))]
|
public void NotSupportedProjectLanguage() |
||||||
// public void NotSupportedProjectLanguage()
|
{ |
||||||
// {
|
project = WebReferenceTestHelper.CreateTestProject("Foo"); |
||||||
// project = WebReferenceTestHelper.CreateTestProject("Foo");
|
|
||||||
//
|
protocol = new DiscoveryClientProtocol(); |
||||||
// protocol = new DiscoveryClientProtocol();
|
DiscoveryDocumentReference discoveryRef = new DiscoveryDocumentReference(); |
||||||
// DiscoveryDocumentReference discoveryRef = new DiscoveryDocumentReference();
|
discoveryRef.Url = updateFromUrl; |
||||||
// discoveryRef.Url = updateFromUrl;
|
protocol.References.Add(discoveryRef); |
||||||
// protocol.References.Add(discoveryRef);
|
|
||||||
//
|
ContractReference contractRef = new ContractReference(); |
||||||
// ContractReference contractRef = new ContractReference();
|
contractRef.Url = "http://localhost/test.asmx?wsdl"; |
||||||
// contractRef.Url = "http://localhost/test.asmx?wsdl";
|
contractRef.ClientProtocol = new DiscoveryClientProtocol(); |
||||||
// contractRef.ClientProtocol = new DiscoveryClientProtocol();
|
ServiceDescription desc = new ServiceDescription(); |
||||||
// ServiceDescription desc = new ServiceDescription();
|
contractRef.ClientProtocol.Documents.Add(contractRef.Url, desc); |
||||||
// contractRef.ClientProtocol.Documents.Add(contractRef.Url, desc);
|
protocol.References.Add(contractRef); |
||||||
// protocol.References.Add(contractRef);
|
|
||||||
//
|
WebReferenceTestHelper.InitializeProjectBindings(); |
||||||
// WebReferenceTestHelper.InitializeProjectBindings();
|
|
||||||
//
|
webReference = new Gui.WebReference(project, updateFromUrl, name, proxyNamespace, protocol); |
||||||
// webReference = new SD.WebReference(project, updateFromUrl, name, proxyNamespace, protocol);
|
|
||||||
//
|
proxyFileProjectItem = WebReferenceTestHelper.GetFileProjectItem(webReference.Items, "Web References\\localhost\\Reference.vb", ItemType.Compile); |
||||||
// proxyFileProjectItem = WebReferenceTestHelper.GetFileProjectItem(webReference.Items, "Web References\\localhost\\Reference.vb", ItemType.Compile);
|
} |
||||||
// }
|
} |
||||||
// }
|
} |
||||||
//}
|
|
||||||
|
|||||||
Loading…
Reference in new issue