4 These tests can be run either as part of System.ServiceModel_test_<profile>.dll
5 or as the stand-alone MetadataTests.dll, which bundles all the XML files as
8 Generating and updating the XML Samples:
9 ========================================
11 Mono's WsdlExporter is not yet capable of generating the wsdl files that
12 are used as test input here.
14 To generate the XML files, compile the ExportUtil.exe tool either by using the
15 ExportUtil.csproj or compiling it manually:
17 mcs -r:System.ServiceModel -r:System.Web.Services ExportUtil.cs MetadataSamples.cs TestContext.cs
19 Then copy the binary to a Windows machine and run it there. This will generate a bunch of
20 .xml files. Run dos2unix on them and copy them into the Resources/ subdirectory.
25 To add a new test, add a method with the [MetadataaSample] attribute to
26 MetadataSamples.cs, like this:
29 public static MetadataSet MyXML ()
34 You may also specify a name:
36 [MetadataSample ("MyXML")]
37 public static MetadataSet RandomMethodName ()
41 Re-compile ExportUtil.exe and it will produce a new 'MyXML.xml' file.
43 Then write a new test case:
48 var doc = TestContext.GetMetadata ("MyXML");
52 The idea behind the 'TestContext' class is to allow "self-hosting" at a
53 later time, ie. use Mono's WsdlExporter to generate the metadata instead
54 of loading the on-disk file without having to modify a bunch of tests.