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

EndsWith_Invalid() private method

private EndsWith_Invalid ( ) : void
return void
        public static void EndsWith_Invalid()
        {
            // Value is null
            Assert.Throws<ArgumentNullException>("value", () => "foo".EndsWith(null));
            Assert.Throws<ArgumentNullException>("value", () => "foo".EndsWith(null, StringComparison.CurrentCulture));

            // Invalid comparison type
            Assert.Throws<ArgumentException>("comparisonType", () => "foo".EndsWith("", StringComparison.CurrentCulture - 1));
            Assert.Throws<ArgumentException>("comparisonType", () => "foo".EndsWith("", StringComparison.OrdinalIgnoreCase + 1));
        }
StringTests