public static async Task <IJiraSprintService> GetSprintService(string profileName) { var profile = GetProfile(); profile.ProfileName = profileName; var service = await JiraProfileService.Create(profile); return(service.GetSprintService()); }
private static async Task CreateNewProfile() { var count = (await JiraProfileService.GetAvailableProfiles()).Count(); var profile = await ConsoleI.RenderForm <TerminalJiraProfile>(); var isDefault = ConsoleI.AskConfirmation("Set as default profile"); var service = await JiraProfileService.Create(profile, ""); Console.WriteLine("Created profile " + profile.ProfileName); if (count == 0 || isDefault) { await service.SetAsDefault(); Console.WriteLine("Profile set as default"); } }
public async Task JiraProfileCreateUpdate() { var profile = JiraProfileLoader.GetProfile(); var service = await JiraProfileService.Create(profile); Assert.NotNull(service); Assert.True(service.DbPath.Exists); var p = service.GetProfile(); Assert.NotNull(p); Assert.Equal(profile.Pass, p.Pass); Assert.Equal(profile.User, p.User); Assert.Equal(profile.Url, p.Url); service.Dispose(); var isClean = await JiraProfileLoader.CleanProfile(profile.ProfileName); Assert.True(isClean); }