コード例 #1
0
        public void CL_WorkItemTracking_RecycleBin_GetDeletedItem_Success()
        {
            // arrange
            RecycleBin recycleBin = new RecycleBin(_configuration);
            WorkItems  workItems  = new WorkItems(_configuration);

            // act
            ////create workitem, delete them, get from bin by id
            var item = workItems.CreateWorkItem(_configuration.Project);

            workItems.DeleteWorkItem(Convert.ToInt32(item.Id));

            var result = recycleBin.GetDeletedItem(Convert.ToInt32(item.Id));

            //assert
            Assert.IsNotNull(result);
            Assert.AreEqual(result.Id, item.Id);
        }
コード例 #2
0
        public void WorkItemTracking_RecycleBin_GetDeletedItem_Success()
        {
            // arrange
            WorkItems  workItemsRequest  = new WorkItems(_configuration);
            RecycleBin recyclebinRequest = new RecycleBin(_configuration);

            // act
            WorkItemPatchResponse.WorkItem         createResponse         = workItemsRequest.CreateWorkItem(_configuration.Project);
            WorkItemPatchResponse.WorkItem         deleteResponse         = workItemsRequest.DeleteWorkItem(createResponse.id.ToString());
            GetItemFromRecycleBinResponse.WorkItem getDeletedItemResponse = recyclebinRequest.GetDeletedItem(_configuration.Project, createResponse.id.ToString());

            //assert
            Assert.AreEqual(HttpStatusCode.OK, createResponse.HttpStatusCode);
            Assert.AreEqual(HttpStatusCode.OK, deleteResponse.HttpStatusCode);
            Assert.AreEqual(HttpStatusCode.OK, getDeletedItemResponse.HttpStatusCode);

            workItemsRequest  = null;
            recyclebinRequest = null;
        }