当前位置: 首页>>代码示例>>C#>>正文


C# Statuses.BeginMentions方法代码示例

本文整理汇总了C#中Statuses.BeginMentions方法的典型用法代码示例。如果您正苦于以下问题:C# Statuses.BeginMentions方法的具体用法?C# Statuses.BeginMentions怎么用?C# Statuses.BeginMentions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Statuses的用法示例。


在下文中一共展示了Statuses.BeginMentions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: BeginMentions_WithDefaultParameters_HasParametersSet

        public void BeginMentions_WithDefaultParameters_HasParametersSet()
        {
            // act
            var twitterClient = Substitute.For<IBaseTwitterClient>();
            twitterClient.When(a => a.BeginRequest(Arg.Any<string>(), Arg.Any<IDictionary<string, string>>(), Arg.Any<WebMethod>(), Arg.Any<RestCallback>()))
             .Do(c =>
             {
                 c.AssertParameter("trim_user", false);
                 c.AssertParameter("include_entities", false);
             });
            var statuses = new Statuses(twitterClient);

            // act
            statuses.BeginMentions((a, b, c) => { });
        }
开发者ID:hsinchen,项目名称:MahApps.Twitter,代码行数:15,代码来源:StatusesTests.cs

示例2: BeginMentions_WithParameters_HasParametersSet

        public void BeginMentions_WithParameters_HasParametersSet()
        {
            // arrange
            const int sinceId = 100;
            const int maxId = 200;
            const int count = 20;
            const int page = 1;
            const bool trimUser = true;
            const bool includeEntities = true;
            
            // act
            var twitterClient = Substitute.For<IBaseTwitterClient>();
            twitterClient.When(a => a.BeginRequest(Arg.Any<string>(), Arg.Any<IDictionary<string, string>>(), Arg.Any<WebMethod>(), Arg.Any<RestCallback>()))
             .Do(c =>
             {
                 c.AssertParameter("since_id", sinceId);
                 c.AssertParameter("max_id", maxId);
                 c.AssertParameter("count", count);
                 c.AssertParameter("page", page);
                 c.AssertParameter("trim_user", trimUser);
                 c.AssertParameter("include_entities", includeEntities);
             });
            var statuses = new Statuses(twitterClient);

            // act
            statuses.BeginMentions(sinceId, maxId, count, page, trimUser, includeEntities, (a, b, c) => { });
        }
开发者ID:hsinchen,项目名称:MahApps.Twitter,代码行数:27,代码来源:StatusesTests.cs

示例3: BeginMentions_WithDefaultParameters_WillReturnList

        public void BeginMentions_WithDefaultParameters_WillReturnList()
        {
            // act
            var wasCalled = false;
            var twitterClient = Substitute.For<IBaseTwitterClient>();
            twitterClient.SetReponseBasedOnRequestPath();
            var statuses = new Statuses(twitterClient);

            // assert
            GenericResponseDelegate endGetMentions = (a, b, c) =>
            {
                wasCalled = true;
                var tweet = c as ResultsWrapper<Tweet>;
                Assert.That(tweet, Is.Not.Null);
                Assert.That(tweet, Is.Not.Empty);
            };

            // act
            statuses.BeginMentions(endGetMentions);

            Assert.That(wasCalled, Errors.CallbackDidNotFire);
        }
开发者ID:hsinchen,项目名称:MahApps.Twitter,代码行数:22,代码来源:StatusesTests.cs


注:本文中的Statuses.BeginMentions方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。