Removed the integration test options

Removed the integration test options because lprun has compileonly
option.
This commit is contained in:
Naveen
2015-10-05 19:40:23 -04:00
parent ffa38afc2b
commit e3da87cdfb
9 changed files with 46 additions and 105 deletions

View File

@@ -12,13 +12,8 @@ async Task Main(string[] args)
var owner = string.Empty;
var reponame = string.Empty;
#if CMD
owner = args[0];
reponame = args[1];
#else
owner = "octokit";
reponame = "octokit.net";
#endif
owner = "octokit";
reponame = "octokit.net";
var client = new GitHubClient(new Octokit.ProductHeaderValue("octokit.samples"));

View File

@@ -17,24 +17,15 @@ async Task Main(string[] args)
//Search Issues with xamarin keyword and get the results
GitHubClient client = new GitHubClient(
new Octokit.ProductHeaderValue("Octokit.samples"));
#if CMD
owner = args[0];
reponame = args[1];
// For integration testing
client.Credentials = new Credentials(
Environment.GetEnvironmentVariable("OCTOKIT_GITHUBUSERNAME"),
Environment.GetEnvironmentVariable("OCTOKIT_GITHUBPASSWORD"));
#else
owner = "octokit";
reponame = "octokit.net";
// or if you don't want to give an app your creds
// you can use a token from an OAuth app
// Here is the URL to get tokens https://github.com/settings/tokens
// and save the token using Util.SetPassword("github","CHANGETHIS")
client.Credentials = new Credentials(Util.GetPassword("github"));
#endif
owner = "octokit";
reponame = "octokit.net";
// or if you don't want to give an app your creds
// you can use a token from an OAuth app
// Here is the URL to get tokens https://github.com/settings/tokens
// and save the token using Util.SetPassword("github","CHANGETHIS")
client.Credentials = new Credentials(Util.GetPassword("github"));
var issue = new SearchIssuesRequest("xamarin");
issue.Repos.Add(owner,reponame);

View File

@@ -12,13 +12,8 @@ async Task Main(string[] args)
var owner = string.Empty;
var reponame = string.Empty;
#if CMD
owner = args[0];
reponame = args[1];
#else
owner = "octokit";
reponame = "octokit.net";
#endif
owner = "octokit";
reponame = "octokit.net";
var client = new GitHubClient(new Octokit.ProductHeaderValue("octokit.samples"));

View File

@@ -11,24 +11,15 @@ async Task Main(string[] args)
var userName = string.Empty;
GitHubClient client = new GitHubClient(new Octokit.ProductHeaderValue("octokit.samples"));
#if CMD
userName = args[0];
// For integration testing
client.Credentials = new Credentials(
Environment.GetEnvironmentVariable("OCTOKIT_GITHUBUSERNAME"),
Environment.GetEnvironmentVariable("OCTOKIT_GITHUBPASSWORD"));
#else
userName = "naveensrinivasan";
// basic authentication
//client.Credentials = new Credentials("username", "password");
// or if you don't want to give an app your creds
// you can use a token from an OAuth app
// Here is the URL to get tokens https://github.com/settings/tokens
// and save the token using Util.SetPassword("github","CHANGETHIS")
client.Credentials = new Credentials(Util.GetPassword("github"));
#endif
userName = "naveensrinivasan";
// basic authentication
//client.Credentials = new Credentials("username", "password");
// or if you don't want to give an app your creds
// you can use a token from an OAuth app
// Here is the URL to get tokens https://github.com/settings/tokens
// and save the token using Util.SetPassword("github","CHANGETHIS")
client.Credentials = new Credentials(Util.GetPassword("github"));
var repositories = await client.Repository.GetAllForUser(userName);
repositories.Select(r => new { r.Name }).Dump(userName + "Repos");

View File

@@ -12,11 +12,7 @@ void Main(string[] args)
{
var owner = string.Empty;
#if CMD
owner = args[0];
#else
owner = "octokit";
#endif
owner = "octokit";
var client = new ObservableGitHubClient(new Octokit.ProductHeaderValue("Octokit.samples"));
client.Repository.GetAllForUser(owner).Select(r => r.Name).Dump();

View File

@@ -13,13 +13,8 @@ async Task Main(string[] args)
GitHubClient client = new GitHubClient(new Octokit.ProductHeaderValue("Octokit.samples"));
#if CMD
owner = args[0];
reponame = args[1];
#else
owner = "octokit";
reponame = "octokit.net";
#endif
owner = "octokit";
reponame = "octokit.net";
var releases = await client.Release.GetAll(owner, reponame);

View File

@@ -17,23 +17,15 @@ async Task Main(string[] args)
GitHubClient client = new GitHubClient(
new Octokit.ProductHeaderValue("Octokit.samples"));
#if CMD
owner = args[0];
reponame = args[1];
// For integration testing
client.Credentials = new Credentials(
Environment.GetEnvironmentVariable("OCTOKIT_GITHUBUSERNAME"),
Environment.GetEnvironmentVariable("OCTOKIT_GITHUBPASSWORD"));
#else
owner = "naveensrinivasan";
reponame = "my-awesome-repo-" + Environment.TickCount;
// or if you don't want to give an app your creds
// you can use a token from an OAuth app
// Here is the URL to get tokens https://github.com/settings/tokens
// and save the token using Util.SetPassword("github","CHANGETHIS")
client.Credentials = new Credentials(Util.GetPassword("github"));
owner = "naveensrinivasan";
reponame = "my-awesome-repo-" + Environment.TickCount;
// or if you don't want to give an app your creds
// you can use a token from an OAuth app
// Here is the URL to get tokens https://github.com/settings/tokens
// and save the token using Util.SetPassword("github","CHANGETHIS")
client.Credentials = new Credentials(Util.GetPassword("github"));
#endif
var email = "person@cooldomain.com";

View File

@@ -13,17 +13,8 @@ async Task Main(string[] args)
{
var userName = string.Empty;
GitHubClient client = new GitHubClient(new Octokit.ProductHeaderValue("Octokit.Samples"));
#if CMD
userName = args[0];
// For integration testing
client.Credentials = new Credentials(
Environment.GetEnvironmentVariable("OCTOKIT_GITHUBUSERNAME"),
Environment.GetEnvironmentVariable("OCTOKIT_GITHUBPASSWORD"));
#else
userName = "naveensrinivasan";
client.Credentials = new Credentials(Util.GetPassword("github"));
#endif
userName = "naveensrinivasan";
client.Credentials = new Credentials(Util.GetPassword("github"));
var observableclient = new ObservableGitHubClient(client);

View File

@@ -13,25 +13,20 @@ async Task Main(string[] args)
{
var userName = string.Empty;
GitHubClient client = new GitHubClient(new Octokit.ProductHeaderValue("Octokit.Samples"));
#if CMD
userName = args[0];
#else
userName = "naveensrinivasan";
client.Credentials = new Credentials(Util.GetPassword("github"));
#endif
client.Credentials = new Credentials(Util.GetPassword("github"));
IIssuesClient issuesclient = client.Issue;
var myissues = await issuesclient.GetAllForCurrent();
myissues.Select(m => new { m.Title, m.Body}).Dump();
IIssuesClient issuesclient = client.Issue;
var myissues = await issuesclient.GetAllForCurrent();
myissues.Select(m => new { m.Title, m.Body}).Dump();
//var issue = new NewIssue("Test");
//var newissue = await issuesclient.Create(owner,reponame,new NewIssue("Test"));
//
//newissue.Dump();
var allissues = await issuesclient.GetAllForRepository("octokit", "octokit.net");
allissues.Select(a => new { a.Title, a.Body}).Dump();
//var issue = new NewIssue("Test");
//var newissue = await issuesclient.Create(owner,reponame,new NewIssue("Test"));
//
//newissue.Dump();
var allissues = await issuesclient.GetAllForRepository("octokit", "octokit.net");
allissues.Select(a => new { a.Title, a.Body}).Dump();
}