public DirectMessagesDestroy ( long statusId ) : Task |
||
statusId | long | |
Résultat | Task |
public async Task DirectMessagesDestroy_Test() { using (var twitterApi = new TwitterApi()) { var mock = new Mock <IApiConnection>(); mock.Setup(x => x.PostLazyAsync <TwitterDirectMessage>( new Uri("direct_messages/destroy.json", UriKind.Relative), new Dictionary <string, string> { { "id", "100" } }) ) .ReturnsAsync(LazyJson.Create(new TwitterDirectMessage { Id = 100L })); twitterApi.apiConnection = mock.Object; await twitterApi.DirectMessagesDestroy(statusId : 100L) .IgnoreResponse() .ConfigureAwait(false); mock.VerifyAll(); } }
public async Task DirectMessagesDestroy_Test() { using (var twitterApi = new TwitterApi()) { var mock = new Mock<IApiConnection>(); mock.Setup(x => x.PostLazyAsync<TwitterDirectMessage>( new Uri("direct_messages/destroy.json", UriKind.Relative), new Dictionary<string, string> { { "id", "100" } }) ) .ReturnsAsync(LazyJson.Create(new TwitterDirectMessage { Id = 100L })); twitterApi.apiConnection = mock.Object; await twitterApi.DirectMessagesDestroy(statusId: 100L) .IgnoreResponse() .ConfigureAwait(false); mock.VerifyAll(); } }