Beispiel #1
0
        public void TearDownMethod()
        {
            _editService = new ProjectEditService(new ProjectEditCallManager(_client));
            RestRequest deleteRequest = new RestRequest(Method.DELETE);

            deleteRequest.AddHeader("Authorization", $"Bearer {AppConfigReader.BearerToken}");
            deleteRequest.Resource = $"projects/{createdProjectId}";
            _client.Execute(deleteRequest);
        }
Beispiel #2
0
        public void SetupMethod()
        {
            _client      = new RestClient(AppConfigReader.BaseUrl);
            _editService = new ProjectEditService(new ProjectEditCallManager(_client));
            RestRequest createRequest = new RestRequest("projects", Method.POST);

            createRequest.AddHeader("Authorization", $"Bearer {AppConfigReader.BearerToken}");
            createRequest.AddParameter("name", "TestName");
            string  createResponse = _client.Execute(createRequest).Content;
            JObject jsonResponse   = JObject.Parse(createResponse);

            createdProjectId = jsonResponse["id"].ToString();
        }