Zoltan Varga ef380e3712 Rename Managed.Windows.Forms to System.Windows.Forms for consistency. 10 роки тому
..
Resources eb285f121c Merge branch 'master' into baulig 13 роки тому
AssemblyInfo.cs 831ce5fccc [WCF]: New WsdlImporter nunit tests and sample wsdl docs. 13 роки тому
BindingTestAssertions.cs eb285f121c Merge branch 'master' into baulig 13 роки тому
ExportTests.cs c1b505c0ca [WCF]: Implement and improve missing WsdlExporter pieces. 13 роки тому
ExportUtil.cs 831ce5fccc [WCF]: New WsdlImporter nunit tests and sample wsdl docs. 13 роки тому
ExportUtil.csproj ef380e3712 Rename Managed.Windows.Forms to System.Windows.Forms for consistency. 10 роки тому
ImportTests.cs eb285f121c Merge branch 'master' into baulig 13 роки тому
ImportTests_CreateMetadata.cs c1b505c0ca [WCF]: Implement and improve missing WsdlExporter pieces. 13 роки тому
ImportTests_LoadMetadata.cs b983c5c7fa [WCF]: Support embedded <wsp:Policy> elements. 13 роки тому
ImportTests_RoundTrip.cs c1b505c0ca [WCF]: Implement and improve missing WsdlExporter pieces. 13 роки тому
MetadataSamples.cs eb285f121c Merge branch 'master' into baulig 13 роки тому
MetadataTests.csproj ef380e3712 Rename Managed.Windows.Forms to System.Windows.Forms for consistency. 10 роки тому
MetadataTests.sln 831ce5fccc [WCF]: New WsdlImporter nunit tests and sample wsdl docs. 13 роки тому
MiscImportTests.cs 7335a66b27 [WCF]: Add and improve MetadataImport tests. 13 роки тому
README.txt 831ce5fccc [WCF]: New WsdlImporter nunit tests and sample wsdl docs. 13 роки тому
TestContext.cs eb285f121c Merge branch 'master' into baulig 13 роки тому
TestLabel.cs 831ce5fccc [WCF]: New WsdlImporter nunit tests and sample wsdl docs. 13 роки тому

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 either by using the
ExportUtil.csproj or compiling it manually:

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.