Ejemplo n.º 1
0
        public void CL_WorkItemTracking_RecycleBin_PermenentlyDeleteItem_Success()
        {
            // arrange
            RecycleBin recycleBin = new RecycleBin(_configuration);
            WorkItems  workItems  = new WorkItems(_configuration);

            // act
            ////create workitem, delete it, perm deleted it, try and get it
            var item = workItems.CreateWorkItem(_configuration.Project);

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

            recycleBin.PermenentlyDeleteItem(Convert.ToInt32(item.Id));
        }
Ejemplo n.º 2
0
        public void WorkItemTracking_RecycleBin_PermenentlyDeletedItem_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());
            HttpStatusCode permDeleteResponse             = recyclebinRequest.PermenentlyDeleteItem(createResponse.id.ToString());


            ////get delete item
            GetWorkItemExpandAllResponse.WorkItem getDeletedWorkItem = workItemsRequest.GetWorkItem(createResponse.id.ToString());

            //assert
            Assert.AreEqual(HttpStatusCode.OK, createResponse.HttpStatusCode);
            Assert.AreEqual(HttpStatusCode.OK, deleteResponse.HttpStatusCode);
            Assert.AreEqual(HttpStatusCode.OK, permDeleteResponse);
            Assert.AreEqual(HttpStatusCode.NoContent, getDeletedWorkItem.HttpStatusCode);

            workItemsRequest  = null;
            recyclebinRequest = null;
        }