diff --git a/src/Microsoft.DotNet.Wpf/tests/UnitTests/System.Xaml.Tests/System/Windows/Markup/XmlnsDefinitionAttributeTests.cs b/src/Microsoft.DotNet.Wpf/tests/UnitTests/System.Xaml.Tests/System/Windows/Markup/XmlnsDefinitionAttributeTests.cs index f1ae0f6237e..38e014d59e4 100644 --- a/src/Microsoft.DotNet.Wpf/tests/UnitTests/System.Xaml.Tests/System/Windows/Markup/XmlnsDefinitionAttributeTests.cs +++ b/src/Microsoft.DotNet.Wpf/tests/UnitTests/System.Xaml.Tests/System/Windows/Markup/XmlnsDefinitionAttributeTests.cs @@ -22,12 +22,12 @@ public void Ctor_String_String(string xmlNamespace, string clrNamespace) [Fact] public void Ctor_NullXmlNamespace_ThrowsArgumentNullException() { - Assert.Throws("xmlNamespace", () => new XmlnsDefinitionAttribute(null, "clrNamespace")); + Assert.Throws("xmlNamespace", () => new XmlnsDefinitionAttribute(null!, "clrNamespace")); } [Fact] public void Ctor_NullClrNamespace_ThrowsArgumentNullException() { - Assert.Throws("clrNamespace", () => new XmlnsDefinitionAttribute("xmlNamespace", null)); + Assert.Throws("clrNamespace", () => new XmlnsDefinitionAttribute("xmlNamespace", null!)); } } diff --git a/src/Microsoft.DotNet.Wpf/tests/UnitTests/System.Xaml.Tests/System/Windows/Markup/XmlnsPrefixAttributeTests.cs b/src/Microsoft.DotNet.Wpf/tests/UnitTests/System.Xaml.Tests/System/Windows/Markup/XmlnsPrefixAttributeTests.cs index 4cdc46a8a92..f8b2c744725 100644 --- a/src/Microsoft.DotNet.Wpf/tests/UnitTests/System.Xaml.Tests/System/Windows/Markup/XmlnsPrefixAttributeTests.cs +++ b/src/Microsoft.DotNet.Wpf/tests/UnitTests/System.Xaml.Tests/System/Windows/Markup/XmlnsPrefixAttributeTests.cs @@ -21,12 +21,12 @@ public void Ctor_String_String(string xmlNamespace, string prefix) [Fact] public void Ctor_NullXmlNamespace_ThrowsArgumentNullException() { - Assert.Throws("xmlNamespace", () => new XmlnsPrefixAttribute(null, "prefix")); + Assert.Throws("xmlNamespace", () => new XmlnsPrefixAttribute(null!, "prefix")); } [Fact] public void Ctor_NullPrefix_ThrowsArgumentNullException() { - Assert.Throws("prefix", () => new XmlnsPrefixAttribute("xmlNamespace", null)); + Assert.Throws("prefix", () => new XmlnsPrefixAttribute("xmlNamespace", null!)); } }