コード例 #1
0
ファイル: TestJiraAPI.cs プロジェクト: Vbow36/TestRepo
        public void TestJiraLogin()
        {
            JiraLogin jiraLogin = new JiraLogin()
            {
                username = "******",
                password = "******"
            };

            IRestClient client = new RestClient()
            {
                BaseUrl = new Uri("http://localhost:9191")
            };

            IRestRequest request = new RestRequest()
            {
                Resource = LoginEndpoint
            };

            request.RequestFormat = DataFormat.Json;
            request.AddJsonBody(jiraLogin);
            request.AddHeader("Contenet-Type", "application/json");

            var response = client.Post <LoginResponse>(request);

            Console.WriteLine(response.Data);
        }
コード例 #2
0
ファイル: TestJiraApi.cs プロジェクト: asimbera111/TestRepo
        public void TestJirAApi()
        {
            JiraLogin jiraLogin = new JiraLogin()
            {
                username = "******",
                password = "******"
            };

            IRestClient restClient = new RestClient()
            {
                BaseUrl = new Uri("http://localhost:9191/")
            };

            IRestRequest restRequest = new RestRequest()
            {
                Resource = LoginEndPoint
            };

            restRequest.RequestFormat = DataFormat.Json;
            restRequest.AddJsonBody(jiraLogin);
            restRequest.AddHeader("Content-Type", "application/json");

            IRestResponse <LoginResponse> restResponse = restClient.Post <LoginResponse>(restRequest);

            Console.WriteLine(restResponse.Data);
            Assert.AreEqual(200, (int)restResponse.StatusCode);
        }
コード例 #3
0
ファイル: Pin.cs プロジェクト: cciamlazy/IssueTimeTracker
        public Pin(JiraLogin jiraLogin)
        {
            if (instance == null || instance.IsDisposed)
            {
                instance = this;
            }
            else
            {
                this.Close();
            }
            _jiraLogin = jiraLogin;
            InitializeComponent();
            this.TopMost = true;

            Setting.Value.CurrentTheme.ApplyTheme(this, new Type[] { typeof(Label), typeof(TextBox), typeof(Button) });
        }
コード例 #4
0
        public static void Login(TestContext context)
        {
            client = new RestClient()
            {
                BaseUrl = new Uri("http://localhost:9191")
            };
            IRestRequest request = new RestRequest()
            {
                Resource = LoginEndPoint
            };
            JiraLogin jiraLogin = new JiraLogin()
            {
                username = "******",
                password = "******"
            };

            request.RequestFormat = DataFormat.Json;
            request.AddJsonBody(jiraLogin);
            request.AddHeader("Content-Type", "application/json");
            LoginResponse = client.Post <LoginResponse>(request);
            Assert.AreEqual(200, (int)LoginResponse.StatusCode);
        }