You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assert.That(outputFiles,Is.Not.Empty,"Output directory should contain files");
269
+
270
+
// The serializer only writes files for namespaces it can resolve from the deserialized graph.
271
+
// Referenced external files in the origin map may not have their namespaces available.
272
+
Assert.That(outputFiles.Length,Is.GreaterThanOrEqualTo(1),"At least the root namespace file should be written");
273
+
Assert.That(outputFiles.Length,Is.LessThanOrEqualTo(originMap.GetAllSourceFiles().Count()),"Should not write more files than source files in origin map");
274
+
275
+
foreach(varoutputFileinoutputFiles)
276
+
{
277
+
Assert.That(outputFile.Length,Is.GreaterThan(0),$"File {outputFile.Name} should not be empty");
278
+
279
+
varxmlDoc=newXmlDocument();
280
+
Assert.That(()=>xmlDoc.Load(outputFile.FullName),Throws.Nothing,$"File {outputFile.Name} should be well-formed XML");
281
+
282
+
varrootElement=xmlDoc.DocumentElement;
283
+
Assert.That(rootElement,Is.Not.Null,$"File {outputFile.Name} should have a root element");
284
+
Assert.That(rootElement.LocalName,Is.EqualTo("Namespace"),$"File {outputFile.Name} should have root element 'Namespace'");
285
+
Assert.That(rootElement.GetAttribute("id","http://www.omg.org/spec/XMI/20131001"),Is.Not.Empty,$"File {outputFile.Name} should have an xmi:id attribute");
0 commit comments