Created
June 2, 2019 04:28
-
-
Save runceel/980cd28b716eaa550dc408307e0e22a0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Moq; | |
using System; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace ConsoleApp10 | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var mock = new Mock<IHoge>(MockBehavior.Strict); | |
mock.Setup(x => x.GetThreadsAsync("id", 53, It.IsAny<int?>(), It.IsAny<int?>(), It.IsAny<object>(), It.IsAny<CancellationToken>())).ReturnsAsync(new List<GitPullRequestCommentThread>()).Verifiable(); | |
var r = mock.Object.GetThreadsAsync("id", 53); | |
mock.Verify(); | |
} | |
} | |
public interface IHoge | |
{ | |
Task<List<GitPullRequestCommentThread>> GetThreadsAsync(Guid project, string repositoryId, int pullRequestId, int? iteration = null, int? baseIteration = null, object userState = null, CancellationToken cancellationToken = default); | |
Task<List<GitPullRequestCommentThread>> GetThreadsAsync(Guid project, Guid repositoryId, int pullRequestId, int? iteration = null, int? baseIteration = null, object userState = null, CancellationToken cancellationToken = default); | |
Task<List<GitPullRequestCommentThread>> GetThreadsAsync(string repositoryId, int pullRequestId, int? iteration = null, int? baseIteration = null, object userState = null, CancellationToken cancellationToken = default); | |
Task<List<GitPullRequestCommentThread>> GetThreadsAsync(string project, string repositoryId, int pullRequestId, int? iteration = null, int? baseIteration = null, object userState = null, CancellationToken cancellationToken = default); | |
Task<List<GitPullRequestCommentThread>> GetThreadsAsync(Guid repositoryId, int pullRequestId, int? iteration = null, int? baseIteration = null, object userState = null, CancellationToken cancellationToken = default); | |
Task<List<GitPullRequestCommentThread>> GetThreadsAsync(string project, Guid repositoryId, int pullRequestId, int? iteration = null, int? baseIteration = null, object userState = null, CancellationToken cancellationToken = default); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment