Пример #1
0
        public static async Task <IJiraSprintService> GetSprintService(string profileName)
        {
            var profile = GetProfile();

            profile.ProfileName = profileName;
            var service = await JiraProfileService.Create(profile);

            return(service.GetSprintService());
        }
Пример #2
0
        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");
            }
        }
Пример #3
0
        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);
        }