Esempio n. 1
0
        public async Task TestGetPossibleTransitions()
        {
            var defaultJsonHttpContentConverterConfiguration = new DefaultJsonHttpContentConverterConfiguration
            {
                LogThreshold = 0
            };

            HttpBehaviour.Current.SetConfig(defaultJsonHttpContentConverterConfiguration);
            JiraConfig.ExpandGetTransitions = new[] { "transitions.fields" };
            var transitions = await Client.Issue.GetPossibleTransitionsAsync(TestIssueKey);

            Assert.NotNull(transitions);
            Assert.True(transitions.Count > 0);
            Assert.NotNull(transitions[0].PossibleFields);
        }
Esempio n. 2
0
        /// <summary>
        ///     Default test setup, can also take care of setting the authentication
        /// </summary>
        /// <param name="testOutputHelper"></param>
        /// <param name="doLogin"></param>
        protected TestBase(ITestOutputHelper testOutputHelper, bool doLogin = true)
        {
            var defaultJsonHttpContentConverterConfiguration = new DefaultJsonHttpContentConverterConfiguration
            {
                LogThreshold = 0
            };

            HttpBehaviour.Current.SetConfig(defaultJsonHttpContentConverterConfiguration);

            LogSettings.RegisterDefaultLogger <XUnitLogger>(LogLevels.Verbose, testOutputHelper);
            Client   = JiraClient.Create(TestJiraUri);
            Username = Environment.GetEnvironmentVariable("jira_test_username");
            Password = Environment.GetEnvironmentVariable("jira_test_password");

            if (doLogin && !string.IsNullOrEmpty(Username) && !string.IsNullOrEmpty(Password))
            {
                Client.SetBasicAuthentication(Username, Password);
            }
        }