Ejemplo n.º 1
0
        public void GetWorkItemTypes_UnitTest()
        {
            JsonWitAPI   api     = APIFactory.JsonWorkItemAPI;
            const string project = "RestPlaypen";

            Task <IReadOnlyDictionary <string, JsonWorkItemType> > task   = api.GetWorkItemTypes(project);
            IReadOnlyDictionary <string, JsonWorkItemType>         result = task.Result;

            Assert.IsNotNull(result);
            Assert.IsTrue(result.Count > 0);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the work item types.
        /// </summary>
        /// <param name="project">The project.</param>
        /// <returns>Task&lt;IReadOnlyList&lt;IWorkItemType&gt;&gt;.</returns>
        /// <exception cref="ToBeImplementedException"></exception>
        public async Task <IReadOnlyDictionary <string, IWorkItemType> > GetWorkItemTypes(string project)
        {
            IReadOnlyDictionary <string, WorkItemTypeImpl> values = await r_JsonAPI.GetWorkItemTypes(project, WorkItemTypeImpl.FromToken);

            return(values.ToDictionary <KeyValuePair <string, WorkItemTypeImpl>, string, IWorkItemType>(pair => pair.Key, pair => pair.Value));
        }