mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 01:41:17 -10:00
client/external/GlobalWeatherTest.cs, client/external/HPcatalogTest.cs, client/external/IODCODESPOSTAUXTest.cs, client/external/TemperatureServiceTest.cs, client/localhost/DataServiceTest.cs, client/localhost/DuplicateArrayTestTest.cs, client/localhost/IncludeTestTest.cs, client/localhost/TestBinding4Test.cs: Use new nunit 2.2 api. * server/ConvDocLitWra.asmx, server/ConvDocEncWra.asmx, server/ConvDocLitBar.asmx, server/ConvDocLitWra.asmx, server/ConvRpc.asmx, * wstest.cs: Added support for generating tests cases from a template. Useful to test the same case in all formats and protocols. * proxies.net.xml.gz, wsdlfiles.tar.gz: Updated. * client/localhost/ConvDocEncBarTest.cs, client/localhost/ConvDocLitBarTest.cs, client/localhost/ConvDocLitWraTest.cs, client/localhost/ConvRpcTest.cs, client/localhost/ConvDocEncBar.asmx: Improved tests. Use new nunit 2.2 api. * Conv.cs.template: template for ConverterService client tests. * Conv.asmx.template: template for ConverterService services. * templates.xml: Configuration file for generating the tests. svn path=/trunk/mcs/; revision=30621
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
// Web service test for WSDL document:
|
|
// http://localhost:8080/DuplicateArrayTest.asmx?wsdl
|
|
|
|
using System;
|
|
using NUnit.Framework;
|
|
using DuplicateArrayTestTests.Soap;
|
|
|
|
namespace Localhost.DuplicateArrayTestTests
|
|
{
|
|
[TestFixture]
|
|
public class DuplicateArrayTestTest: WebServiceTest
|
|
{
|
|
[Test]
|
|
public void TestService ()
|
|
{
|
|
DuplicateArrayTest s = new DuplicateArrayTest();
|
|
|
|
string title = "hello";
|
|
string url = "tmp";
|
|
correctionsCorrection c = new correctionsCorrection();
|
|
c.word = "bye";
|
|
c.suggestions = new string[]{"end","test"};
|
|
correctionsCorrection[] arr = new correctionsCorrection[2]{c,c};
|
|
arr = s.SpellCheck(ref title,ref url,arr);
|
|
|
|
Assert.AreEqual (2, arr.Length, "t1");
|
|
|
|
for (int i =0; i< arr.Length ; i++)
|
|
{
|
|
c = arr[i];
|
|
Assert.IsNotNull (c, "t2."+i);
|
|
Assert.AreEqual ("bye", c.word, "t3."+i);
|
|
Assert.IsNotNull (c.suggestions, "t4."+i);
|
|
Assert.AreEqual (2, c.suggestions.Length, "t5."+i);
|
|
Assert.AreEqual ("end", c.suggestions[0], "t6."+i);
|
|
Assert.AreEqual ("test", c.suggestions[1], "t7."+i);
|
|
}
|
|
Assert.AreEqual ("hello", title, "t8");
|
|
Assert.AreEqual ("tmp", url, "t9");
|
|
}
|
|
}
|
|
}
|