static async Task AddMemberRangeToListAsync(TwitterContext twitterCtx) { string ownerScreenName = "Linq2Twitr"; var screenNames = new List <string> { "JoeMayo", "Linq2Twitr" }; List?list = await twitterCtx.AddMemberRangeToListAsync( 0, "linq-to-twitter", 0, ownerScreenName, screenNames); if (list != null && list.Users != null) { list.Users.ForEach(user => Console.WriteLine(user.Name)); } }
public async Task AddMemberRangeToListAsync_For_ScreenNames_Requires_ListID_Or_Slug() { InitializeTwitterContext(); var ex = await L2TAssert.Throws <ArgumentException>( async() => await ctx.AddMemberRangeToListAsync(0, null, 0, null, new List <string> { "SomeName" })); Assert.AreEqual("ListIdOrSlug", ex.ParamName); }