Skip to content

Commit

Permalink
[System.Xml] Don't hardcode nunit-lite-console in GeneratedCodeAttribute
Browse files Browse the repository at this point in the history
Instead determine it at runtime.

(cherry picked from commit 1bc213f)
  • Loading branch information
akoeplinger committed Mar 27, 2019
1 parent faddbca commit 18b4372
Showing 1 changed file with 3 additions and 2 deletions.
Expand Up @@ -45,10 +45,11 @@ public void ExportTypeMapping_ArrayClass ()
ICodeGenerator generator = provider.CreateGenerator ();
generator.GenerateCodeFromNamespace (codeNamespace, sw, new CodeGeneratorOptions ());

var currentAssembly = Assembly.GetEntryAssembly ().GetName ();
Assert.AreEqual (string.Format(CultureInfo.InvariantCulture,
"{0}{0}" +
"/// <remarks/>{0}" +
"[System.CodeDom.Compiler.GeneratedCodeAttribute(\"nunit-lite-console\", \"0.0.0.0\")]{0}" +
"[System.CodeDom.Compiler.GeneratedCodeAttribute(\"{1}\", \"{2}\")]{0}" +
"[System.SerializableAttribute()]{0}" +
"[System.Diagnostics.DebuggerStepThroughAttribute()]{0}" +
"[System.ComponentModel.DesignerCategoryAttribute(\"code\")]{0}" +
Expand All @@ -66,7 +67,7 @@ public void ExportTypeMapping_ArrayClass ()
" this.namesField = value;{0}" +
" }}{0}" +
" }}{0}" +
"}}{0}", Environment.NewLine), sw.ToString (), "#2");
"}}{0}", Environment.NewLine, currentAssembly.Name, currentAssembly.Version), sw.ToString (), "#2");


codeNamespace = ExportCode (typeof (ArrayClass[]));
Expand Down

0 comments on commit 18b4372

Please sign in to comment.