public override ISourceProvider GetSourceProvider(string repositoryType) { ISourceProvider sourceProvider = base.GetSourceProvider(repositoryType); if (sourceProvider.GetType() == typeof(GitHubSourceProvider)) { return(new FakeGitHubSourceProvider()); } else if (sourceProvider.GetType() == typeof(BitbucketGitSourceProvider)) { return(new FakeBitbucketGitSourceProvider()); } else if (sourceProvider.GetType() == typeof(ExternalGitSourceProvider)) { return(new FakeExternalGitSourceProvider()); } else if (sourceProvider.GetType() == typeof(TfsGitSourceProvider)) { return(new FakeTfsGitSourceProvider()); } else { throw new Exception("Source provider not mocked: " + repositoryType); } }