Beispiel #1
0
        public static async Task SetupClient(TestContext context)
        {
            generalConfig = GeneralConfig.Instance.Value;
            var conf = new BacklogJpConfigure(generalConfig.SpaceKey);

            conf.ApiKey = generalConfig.ApiKey;
            client      = new BacklogClientFactory(conf).NewClient();
            var users = await client.GetUsersAsync();

            projectKey = generalConfig.ProjectKey;
            var project = await client.GetProjectAsync(projectKey);

            projectId = project.Id;

            gitConfig = GitConfig.Instance.Value;

            ownUser = await client.GetMyselfAsync();

            var numericUserIds = (await client.GetUsersAsync()).ToDictionary(x => x.UserId, x => x.Id);

            notifiedNumericUserIds = new[]
            { gitConfig.NotifiedUserId1, gitConfig.NotifiedUserId2, gitConfig.NotifiedUserId3 }
            .Select(x => numericUserIds[x])
            .ToArray();

            assigneeUserIds = new[]
            { gitConfig.AssigneeUserId1, gitConfig.AssigneeUserId2, gitConfig.AssigneeUserId3 }
            .Select(x => numericUserIds[x])
            .ToArray();
        }
        public static async Task SetupClient(TestContext context)
        {
            generalConfig = GeneralConfig.Instance.Value;
            var conf = new BacklogJpConfigure(generalConfig.SpaceKey);

            conf.ApiKey = generalConfig.ApiKey;
            client      = new BacklogClientFactory(conf).NewClient();
            var users = await client.GetUsersAsync();

            projectKey = generalConfig.ProjectKey;
            var project = await client.GetProjectAsync(projectKey);

            projectId = project.Id;

            ownUser = await client.GetMyselfAsync();
        }
Beispiel #3
0
        public async Task GetMyselfTestAsync()
        {
            var ownuser = await client.GetMyselfAsync();

            Assert.AreEqual(ownuser.UserId, generalConfig.OwnUserId);
        }