public NuGetWrapper(NureOptions p_NureOptions, string p_RepositoryDirectory) { m_NureOptions = p_NureOptions; m_RepositoryDirectory = p_RepositoryDirectory; m_MonitoredProjects = GetProjects(); }
public PullRequestWriterFactory(NureOptions p_NureOptions, string p_HostingUsername, string p_HostingPassword) { m_NureOptions = p_NureOptions; m_HostingUsername = p_HostingUsername; m_HostingPassword = p_HostingPassword; }
public void ValidPullRequestIsSent() { BitbucketPullRequest bitbucketPullRequest = new BitbucketPullRequest(); List <BitbucketUser> reviewers = GivenDefaultReviewers(); NureOptions nureOptions = GivenNureOptions(); m_ClientMock.Setup(client => client.GetCurrentUser()).Returns(new BitbucketUser()); m_ClientMock.Setup(client => client.GetDefaultReviewers()).Returns(reviewers); m_ClientMock.Setup(client => client.SendPullRequest(It.IsAny <BitbucketPullRequest>())).Callback <BitbucketPullRequest>(pr => bitbucketPullRequest = pr); BitbucketPullRequestWriter pullRequestWriter = new BitbucketPullRequestWriter(nureOptions, m_ClientMock.Object); pullRequestWriter.WritePullRequest(A_BRANCH_NAME); m_ClientMock.Verify(client => client.GetCurrentUser()); m_ClientMock.Verify(client => client.GetDefaultReviewers()); m_ClientMock.Verify(client => client.SendPullRequest(It.IsAny <BitbucketPullRequest>())); Assert.Equal(nureOptions.PullRequestTitle, bitbucketPullRequest.Title); Assert.Equal(nureOptions.PullRequestDescription, bitbucketPullRequest.Description); Assert.Equal(A_BRANCH_NAME, bitbucketPullRequest.SourceBranch.Branch.Name); Assert.Equal(nureOptions.DefaultBranch, bitbucketPullRequest.DestinationBranch.Branch.Name); Assert.Equal(reviewers, bitbucketPullRequest.Reviewers); }
public GitHubPullRequestWriter(NureOptions p_NureOptions, string p_AccessToken) { m_NureOptions = p_NureOptions; m_AccessToken = p_AccessToken; }
public NuKeeperWrapper(NureOptions p_NureOptions, string p_RepositoryDirectory) { m_NureOptions = p_NureOptions; m_RepositoryDirectory = p_RepositoryDirectory; }
public BitbucketPullRequestWriter(NureOptions p_NureOptions, IBitbucketClient p_BitbucketClient) { m_NureOptions = p_NureOptions; m_BitbucketClient = p_BitbucketClient; }