Skip to content

Commit 915bc1c

Browse files
committed
fix unit tests
1 parent 89b80b3 commit 915bc1c

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

WpfDesign.Designer/Tests/Designer/EditOperationTests.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ public void PasteCustomControlUsingMixedTypes()
265265
"</sdtcontrols:CustomButton>\n";
266266

267267
AssertGridDesignerOutput(expectedXaml, grid.Context,
268-
"xmlns:sdtcontrols=\"http://sharpdevelop.net/WpfDesign/Tests/Controls\"",
269-
"xmlns:Controls0=\"clr-namespace:ICSharpCode.WpfDesign.Tests.Designer;assembly=ICSharpCode.WpfDesign.Tests\"");
268+
"xmlns:Controls0=\"clr-namespace:ICSharpCode.WpfDesign.Tests.Designer;assembly=ICSharpCode.WpfDesign.Tests\"",
269+
"xmlns:sdtcontrols=\"http://sharpdevelop.net/WpfDesign/Tests/Controls\"");
270270
}
271271

272272
[Test]
@@ -294,8 +294,8 @@ public void PasteCustomControlUsingStaticResource()
294294
"<sdtcontrols:CustomButton Tag=\"{StaticResource res1}\" />\n";
295295

296296
AssertGridDesignerOutput(expectedXaml, grid.Context,
297-
"xmlns:Controls0=\"clr-namespace:ICSharpCode.WpfDesign.Tests.Designer;assembly=ICSharpCode.WpfDesign.Tests\"",
298-
"xmlns:sdtcontrols=\"http://sharpdevelop.net/WpfDesign/Tests/Controls\"");
297+
"xmlns:Controls0=\"clr-namespace:ICSharpCode.WpfDesign.Tests.Designer;assembly=ICSharpCode.WpfDesign.Tests\"",
298+
"xmlns:sdtcontrols=\"http://sharpdevelop.net/WpfDesign/Tests/Controls\"");
299299

300300
var xamlContext = grid.Context as XamlDesignContext;
301301
Assert.IsNotNull(xamlContext);

WpfDesign.XamlDom/Project/XamlObject.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ internal XmlAttribute XmlAttribute {
139139

140140
string GetPrefixOfNamespace(string ns, XmlElement target)
141141
{
142+
if (target.NamespaceURI == ns)
143+
return null;
142144
var prefix = target.GetPrefixOfNamespace(ns);
143145
if (!string.IsNullOrEmpty(prefix))
144146
return prefix;

0 commit comments

Comments
 (0)