public void Base_JsonInterpreter()
        {
            int counter = 0;

            foreach (var tpl in IssueListSnapshotBuilder.ExtractIssueNodes("myAccount", "myRepo", new string[] { Resources.GetIssuesResponse_FirstDraft() }))
            {
                TextWriter.Null.WriteLine(tpl.Item2);
                counter += 1;
            }
            Assert.Equal(15, counter); //adjusted from 20 to 15 at 11.08.2015
        }
Beispiel #2
0
        public void Extract_Issues_By_Repo(string owner, string repo)
        {
            int    counter = 0;
            string ts      = DateTime.Now.ToString("yyyyMMddHHmmss");

            this.Extractor.MaximumNodesCountPerRequest = 15;
            foreach (string json in this.Extractor.GetIssueMetadataAsynch(this.Token, owner, repo).Result)
            {
                string fn       = string.Format("Issues_{0}_{1}_{2}.json", ts, counter, owner);
                string fullName = Path.Combine(this.TargetDirectory, fn);
                File.WriteAllText(fullName, json);
                int cnt = System.Linq.Enumerable.Count(IssueListSnapshotBuilder.ExtractIssueNodes(owner, repo, new string[] { json }));
                Assert.Equal(this.Extractor.MaximumNodesCountPerRequest, cnt);
                counter += 1;
                if (counter > 2)
                {
                    break;
                }
            }
        }