System.Tests.StringTests.Replace_String_StringInvalid C# (CSharp) Method

Replace_String_StringInvalid() private method

private Replace_String_StringInvalid ( ) : void
return void
        public static void Replace_String_StringInvalid()
        {
            Assert.Throws<ArgumentNullException>("oldValue", () => "Hello".Replace(null, "")); // Old value is null
            Assert.Throws<ArgumentException>("oldValue", () => "Hello".Replace("", "l")); // Old value is empty
        }
StringTests