Skip to content

Commit

Permalink
Fix #343
Browse files Browse the repository at this point in the history
Add support for redefined complexTypes
  • Loading branch information
Michael Ganss committed Jul 26, 2022
1 parent cb253fd commit 8fd4172
Show file tree
Hide file tree
Showing 11 changed files with 4,577 additions and 27 deletions.
18 changes: 18 additions & 0 deletions XmlSchemaClassGenerator.Tests/XmlTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ private static IEnumerable<string> ConvertXml(string name, string xsd, Generator
const string DtsxPattern = "xsd/dtsx/dtsx2.xsd";
const string WfsPattern = "xsd/wfs/schemas.opengis.net/wfs/2.0/wfs.xsd";
const string EppPattern = "xsd/epp/*.xsd";
const string GraphMLPattern = "xsd/graphml/ygraphml.xsd";
const string NullableReferenceAttributesPattern = "xsd/nullablereferenceattributes/nullablereference.xsd";

// IATA test takes too long to perform every time
Expand All @@ -128,6 +129,23 @@ private static IEnumerable<string> ConvertXml(string name, string xsd, Generator
// SharedTestFunctions.TestSamples(Output, "Iata", IataPattern);
//}

[Fact, TestPriority(1)]
[UseCulture("en-US")]
public void TestGraphML()
{
Compiler.Generate("GraphML", GraphMLPattern, new Generator
{
NamespaceProvider = new Dictionary<NamespaceKey, string> {
{ new NamespaceKey(new Uri("graphml.xsd", UriKind.RelativeOrAbsolute), "http://graphml.graphdrawing.org/xmlns"), "GraphML.Main" },
{ new NamespaceKey(new Uri("graphml-structure.xsd", UriKind.RelativeOrAbsolute), "http://graphml.graphdrawing.org/xmlns"), "GraphML.Structure" },
{ new NamespaceKey(new Uri("ygraphxml.xsd", UriKind.RelativeOrAbsolute), "http://graphml.graphdrawing.org/xmlns"), "GraphML.Y" },
{ new NamespaceKey("http://www.w3.org/1999/xlink"), "XLink" },
{ new NamespaceKey("http://www.yworks.com/xml/graphml"), "YEd" },
}.ToNamespaceProvider(new GeneratorConfiguration { NamespacePrefix = "GraphML" }.NamespaceProvider.GenerateNamespace),
});
SharedTestFunctions.TestSamples(Output, "GraphML", GraphMLPattern);
}

[Fact, TestPriority(1)]
[UseCulture("en-US")]
public void TestClient()
Expand Down
Loading

0 comments on commit 8fd4172

Please sign in to comment.