Alexander Köplinger 2439f17bef Revert "Merge pull request #5330 from alexanderkyte/dedup_mkbundle" 8 years ago
..
Resources eb285f121c Merge branch 'master' into baulig 13 years ago
AssemblyInfo.cs 831ce5fccc [WCF]: New WsdlImporter nunit tests and sample wsdl docs. 13 years ago
BindingTestAssertions.cs 1a89bfde05 [System.Xml/System.ServiceModel/Dataflow] Use more specific type in assert 9 years ago
ExportTests.cs 863dc73d19 [bcl] Add NUnitHelper.cs with API not in nunit-lite 9 years ago
ExportUtil.cs 831ce5fccc [WCF]: New WsdlImporter nunit tests and sample wsdl docs. 13 years ago
ImportTests.cs 863dc73d19 [bcl] Add NUnitHelper.cs with API not in nunit-lite 9 years ago
ImportTests_CreateMetadata.cs c1b505c0ca [WCF]: Implement and improve missing WsdlExporter pieces. 13 years ago
ImportTests_LoadMetadata.cs 863dc73d19 [bcl] Add NUnitHelper.cs with API not in nunit-lite 9 years ago
ImportTests_RoundTrip.cs c1b505c0ca [WCF]: Implement and improve missing WsdlExporter pieces. 13 years ago
MetadataSamples.cs c4a5b6b5c3 [mcs] Remove NET_4_5 ifdef from the source files 9 years ago
MiscImportTests.cs 863dc73d19 [bcl] Add NUnitHelper.cs with API not in nunit-lite 9 years ago
README.txt f95b3f433c [bcl] Cleanup outdated csproj/sln files (#4806) 8 years ago
TestContext.cs 2439f17bef Revert "Merge pull request #5330 from alexanderkyte/dedup_mkbundle" 8 years ago
TestLabel.cs 831ce5fccc [WCF]: New WsdlImporter nunit tests and sample wsdl docs. 13 years ago

README.txt

Metadata Tests
==============

These tests can be run either as part of System.ServiceModel_test_.dll
or as the stand-alone MetadataTests.dll, which bundles all the XML files as
embedded resources.

Generating and updating the XML Samples:
========================================

Mono's WsdlExporter is not yet capable of generating the wsdl files that
are used as test input here.

To generate the XML files, compile the ExportUtil.exe tool:

mcs -r:System.ServiceModel -r:System.Web.Services ExportUtil.cs MetadataSamples.cs TestContext.cs

Then copy the binary to a Windows machine and run it there. This will generate a bunch of
.xml files. Run dos2unix on them and copy them into the Resources/ subdirectory.

Adding new Tests:
=================

To add a new test, add a method with the [MetadataaSample] attribute to
MetadataSamples.cs, like this:

[MetadataSample]
public static MetadataSet MyXML ()
{
....
}

You may also specify a name:

[MetadataSample ("MyXML")]
public static MetadataSet RandomMethodName ()
{
}

Re-compile ExportUtil.exe and it will produce a new 'MyXML.xml' file.

Then write a new test case:

[Test]
public void MyXML ()
{
var doc = TestContext.GetMetadata ("MyXML");
... test it here
}

The idea behind the 'TestContext' class is to allow "self-hosting" at a
later time, ie. use Mono's WsdlExporter to generate the metadata instead
of loading the on-disk file without having to modify a bunch of tests.