public void GetWorkItems_UnitTest() { IWorkItemAPI api = APIFactory.WorkItemAPI; var idList = new List <int> { 62 }; Task <IReadOnlyList <IWorkItem> > task = api.GetWorkItems(idList); Assert.IsNotNull(task); IReadOnlyList <IWorkItem> result = task.Result; Assert.IsNotNull(result); Assert.AreEqual(idList.Count, result.Count); }
private static WorkItemWrapper GetTargetWorkItem(int id) { IWorkItemAPI api = APIFactory.WorkItemAPI; var idList = new List <int> { id }; Task <IReadOnlyList <IWorkItem> > task = api.GetWorkItems(idList); Assert.IsNotNull(task); IReadOnlyList <IWorkItem> result = task.Result; Assert.IsNotNull(result); var workItem = (WorkItemWrapper)result[0]; return(workItem); }