public static void Join_StringArray_Invalid()
{
// Values is null
Assert.Throws<ArgumentNullException>("value", () => string.Join("$$", null));
Assert.Throws<ArgumentNullException>("value", () => string.Join("$$", null, 0, 0));
Assert.Throws<ArgumentNullException>("values", () => string.Join("|", (IEnumerable<string>)null));
Assert.Throws<ArgumentNullException>("values", () => string.Join<string>("|", (IEnumerable<string>)null)); // Generic overload
Assert.Throws<ArgumentOutOfRangeException>("startIndex", () => string.Join("$$", new string[] { "Foo" }, -1, 0)); // Start index < 0
Assert.Throws<ArgumentOutOfRangeException>("count", () => string.Join("$$", new string[] { "Foo" }, 0, -1)); // Count < 0
// Start index > separators.Length
Assert.Throws<ArgumentOutOfRangeException>("startIndex", () => string.Join("$$", new string[] { "Foo" }, 2, 1));
Assert.Throws<ArgumentOutOfRangeException>("startIndex", () => string.Join("$$", new string[] { "Foo" }, 0, 2));
}