public void GetGitRepositoryInfoPassEmptyStringAndThrowsArgumentNullException() { this.client.Setup(x => x.GetAsync <IEnumerable <GitRepository> >(It.IsAny <string>())).Returns(Task.FromResult(FakeGitRepository.gitRepositoryList.AsEnumerable())); this.gitHubRepoService = new GitHubRepoService(client.Object); Assert.That(() => this.gitHubRepoService.GetGitRepositoryInfo(string.Empty), Throws.TypeOf <ArgumentNullException>()); }
public void SetUp() { _mockConverter = new Mock <IJsonConverter>(); _mockConfig = new Mock <IConfig>(); _mockWebClient = new Mock <IHttpWebClient>(); _iService = new GitHubRepoService(_mockConfig.Object, _mockWebClient.Object, _mockConverter.Object); }
public MarkdownContentUpdaterScheduledTask(IGitHubRepoService gitHubRepoService, IContentManager contentManager, IClock clock, IScheduledTaskManager scheduledTaskManager) { _gitHubRepoService = gitHubRepoService; _contentManager = contentManager; _clock = clock; _scheduledTaskManager = scheduledTaskManager; Logger = NullLogger.Instance; }
public async Task GetGitRepositoryInfoReturnTypeGitRepository() { this.client.Setup(x => x.GetAsync <IEnumerable <GitRepository> >(It.IsAny <string>())).Returns(Task.FromResult(FakeGitRepository.gitRepositoryList.AsEnumerable())); this.gitHubRepoService = new GitHubRepoService(client.Object); var result = await this.gitHubRepoService.GetGitRepositoryInfo(repoUrl); Assert.IsInstanceOf(typeof(GitRepository), result.First()); }
public HomeController(IGitHubRepoService service) { this.gitHubservice = service; defaultUserRepository = Bootstrapper.GetDefaultGitHubRepo(); }
/// <summary> /// Initializes a new instance of the <see cref="GitHubController"/> class. /// </summary> /// <param name="iRepoService">The i repo service.</param> /// <param name="iCommitService">The i commit service.</param> public GitHubController(IGitHubRepoService iRepoService, IGitHubCommitService iCommitService) { _iRepoService = iRepoService; _iCommitService = iCommitService; }
public GitHubRepoController(IGitHubRepoService gitHubRepoService) { _gitHubRepoService = gitHubRepoService; }
public GithubController(IGitHubRepoService gitHubRepoService, GitHubViewModel gitHubViewModel) { this.gitHubRepoService = gitHubRepoService; this.gitHubViewModel = gitHubViewModel; }
public void InstantiatingGitHubRepoServiceWithNullIWebApiClientThrowsNullRefException() { this.gitHubRepoService = new GitHubRepoService(null); Assert.That(() => this.gitHubRepoService.GetGitRepositoryInfo(repoUrl), Throws.TypeOf <NullReferenceException>()); }
public GitHubUserViewModelService(IGitHubUserInfoService gitHubUserInfoService, IGitHubRepoService gitHubRepoService, IGitHubUserViewModelFactory gitHubUserViewModelFactory) { this.gitHubUserInfoService = gitHubUserInfoService; this.gitHubRepoService = gitHubRepoService; this.gitHubUserViewModelFactory = gitHubUserViewModelFactory; }