Example #1
0
        public void CL_WorkItemTracking_RecycleBin_GetDeletedItems_Success()
        {
            // arrange
            RecycleBin recycleBin = new RecycleBin(_configuration);
            WorkItems  workItems  = new WorkItems(_configuration);
            WorkItem   item       = null;

            int[] ids = new int[2];

            // act
            ////create workitems, delete them, get from bin
            item = workItems.CreateWorkItem(_configuration.Project);
            workItems.DeleteWorkItem(Convert.ToInt32(item.Id));
            ids[0] = Convert.ToInt32(item.Id);

            item = workItems.CreateWorkItem(_configuration.Project);
            workItems.DeleteWorkItem(Convert.ToInt32(item.Id));
            ids[1] = Convert.ToInt32(item.Id);

            var list = recycleBin.GetDeletedItems(_configuration.Project);

            //assert
            Assert.IsNotNull(list);
            Assert.IsTrue(list.Count >= 2);
        }
Example #2
0
        public void WorkItemTracking_RecycleBin_GetDeletedItems_Success()
        {
            // arrange
            RecycleBin request = new RecycleBin(_configuration);

            // act
            GetItemsFromRecycleBinResponse.WorkItems response = request.GetDeletedItems(_configuration.Project);

            //assert
            Assert.AreEqual(HttpStatusCode.OK, response.HttpStatusCode);

            request = null;
        }