public void Test_BinderatorConfig_DownloadAndExtendBinderatorConfigObjects() { BinderatorConfigDownloader bcd = new BinderatorConfigDownloader(); Dictionary <string, IEnumerable <(Tag, List <ConfigRoot>)> > configs = null; configs = bcd.DownloadAndExtendBinderatorConfigObjectsAsync ( user_org: "xamarin", //repo: "googleplayservicescomponents" repo: "GooglePlayServicesComponents" ).Result; foreach (KeyValuePair <string, IEnumerable <(Tag tag, List <ConfigRoot> config_object)> > c in configs) { string repo = c.Key; Console.WriteLine($"----------------------------------------------------------"); Console.WriteLine($"Repo : {c.Key}"); foreach ((Tag tag, List <ConfigRoot> config_root)tag_config_object in c.Value) { Console.WriteLine($" Tag : {tag_config_object.tag.Name}"); Console.WriteLine($" Content : {tag_config_object.config_root}"); System.IO.Directory.CreateDirectory ( $"binderator-configs/{repo}/{tag_config_object.tag.Name}/" ); string json = null; json = Newtonsoft.Json.JsonConvert.SerializeObject ( tag_config_object.config_root, Newtonsoft.Json.Formatting.Indented ); System.IO.File.WriteAllText ( $"binderator-configs/{repo}/{tag_config_object.tag.Name}/config.json", json ); System.IO.File.WriteAllLines ( $"binderator-configs/{repo}/{tag_config_object.tag.Name}/group-ids-not-found-by-mavennet.txt", BinderatorConfigDownloader.GroupIdsNotFoundByMavenNet.ToArray() ); } } return; }
public void Test_BinderatorConfigDownloader_DownloadBinderatorConfigObjects() { BinderatorConfigDownloader bcd = new BinderatorConfigDownloader(); Dictionary <string, IEnumerable <(Tag, List <ConfigRoot>)> > configs = null; configs = bcd.DownloadBinderatorConfigObjectsAsync ( user_org: "xamarin", repo: "AndroidX" ).Result; return; }
public void Test_BinderatorConfig_DownloadBinderatorConfigObjects() { BinderatorConfigDownloader bcd = new BinderatorConfigDownloader(); Dictionary <string, IEnumerable <(Tag, List <ConfigRoot>)> > configs = null; configs = bcd.DownloadBinderatorConfigObjectsAsync ( user_org: "xamarin", //repo: "googleplayservicescomponents" repo: "GooglePlayServicesComponents" ).Result; return; }
public void Test_BinderatorConfig_DownloadBinderatorConfigContents() { BinderatorConfigDownloader bcd = new BinderatorConfigDownloader(); Dictionary <string, IEnumerable <(Tag, string)> > configs = null; configs = bcd.DownloadBinderatorConfigContentsAsync ( user_org: "xamarin", //repo: "googleplayservicescomponents" repo: "GooglePlayServicesComponents" ).Result; #if MSTEST Assert.IsNotNull(configs); Assert.IsTrue(configs.Any()); #elif NUNIT Assert.NotNull(configs); Assert.IsTrue(configs.Any()); #elif XUNIT Assert.NotNull(configs); Assert.True(configs.Any()); #endif Console.WriteLine($"Packages found..."); foreach (KeyValuePair <string, IEnumerable <(Tag tag, string content)> > c in configs) { string repo = c.Key; Console.WriteLine($"----------------------------------------------------------"); Console.WriteLine($"Repo : {c.Key}"); foreach ((Tag tag, string content)tag_content in c.Value) { Console.WriteLine($" Tag : {tag_content.tag.Name}"); Console.WriteLine($" Content : {tag_content.content}"); System.IO.Directory.CreateDirectory ( $"binderator-configs/{repo}/{tag_content.tag.Name}/" ); System.IO.File.WriteAllText ( $"binderator-configs/{repo}/{tag_content.tag.Name}/config.json", tag_content.content ); } return; } }