Beispiel #1
0
        //Actual meat of construction is done here. This ctor is also used for testing
        internal ClubHouseClient(HttpMessageHandler messageHandler)
        {
            if (messageHandler == null)
            {
                throw new ArgumentNullException(nameof(messageHandler));
            }

            HttpClient = new ClubHouseHttpClient(EndPoint, messageHandler);

            Epics       = new EpicResource(HttpClient);
            Files       = new FileResource(HttpClient);
            Labels      = new LabelResource(HttpClient);
            LinkedFiles = new LinkedFileResource(HttpClient);
            Projects    = new ProjectResource(HttpClient);
            StoryLinks  = new StoryLinkResource(HttpClient);
            Stories     = new StoryResource(HttpClient);
            Users       = new UserResource(HttpClient);
            Workflows   = new WorkflowResource(HttpClient);
        }
Beispiel #2
0
        public async Task CreatesPullRequestLabel()
        {
            var labelResource = new LabelResource
            {
                value = new List <Label>
                {
                    new Label
                    {
                        active = true,
                        id     = "id",
                        name   = "nukeeper"
                    }
                }
            };

            var restClient = GetFakeClient(labelResource);
            var request    = new LabelRequest {
                name = "nukeeper"
            };
            var pullRequestLabel = await restClient.CreatePullRequestLabel(request, "ProjectName", "RepoId", 100);

            Assert.IsNotNull(pullRequestLabel);
        }