FavoritesDestroy() public method

public FavoritesDestroy ( long statusId ) : Task>
statusId long
return Task>
Esempio n. 1
0
        public async Task FavoritesDestroy_Test()
        {
            using (var twitterApi = new TwitterApi())
            {
                var mock = new Mock <IApiConnection>();
                mock.Setup(x =>
                           x.PostLazyAsync <TwitterStatus>(
                               new Uri("favorites/destroy.json", UriKind.Relative),
                               new Dictionary <string, string> {
                    { "id", "100" },
                    { "tweet_mode", "extended" },
                })
                           )
                .ReturnsAsync(LazyJson.Create(new TwitterStatus {
                    Id = 100L
                }));

                twitterApi.apiConnection = mock.Object;

                await twitterApi.FavoritesDestroy(statusId : 100L)
                .IgnoreResponse()
                .ConfigureAwait(false);

                mock.VerifyAll();
            }
        }
Esempio n. 2
0
        public async Task FavoritesDestroy_Test()
        {
            using (var twitterApi = new TwitterApi())
            {
                var mock = new Mock<IApiConnection>();
                mock.Setup(x =>
                    x.PostLazyAsync<TwitterStatus>(
                        new Uri("favorites/destroy.json", UriKind.Relative),
                        new Dictionary<string, string> {
                            { "id", "100" },
                            { "tweet_mode", "extended" },
                        })
                )
                .ReturnsAsync(LazyJson.Create(new TwitterStatus { Id = 100L }));

                twitterApi.apiConnection = mock.Object;

                await twitterApi.FavoritesDestroy(statusId: 100L)
                    .IgnoreResponse()
                    .ConfigureAwait(false);

                mock.VerifyAll();
            }
        }