コード例 #1
0
        public void CL_WorkItemTracking_ClassificationNodes_DeleteArea_Success()
        {
            // arrange
            string pathDelete         = System.Guid.NewGuid().ToString().ToUpper().Substring(0, 15) + "-delete";
            string pathMaster         = System.Guid.NewGuid().ToString().ToUpper().Substring(0, 15) + "-master";
            ClassificationNodes nodes = new ClassificationNodes(_configuration);

            // act
            var createDelete = nodes.CreateArea(_configuration.Project, pathDelete);
            var createMaster = nodes.CreateArea(_configuration.Project, pathMaster);

            nodes.DeleteArea(_configuration.Project, pathDelete, createMaster.Id);

            //assert
            Assert.IsNotNull(createDelete);
            Assert.IsNotNull(createMaster);
        }
コード例 #2
0
        public void WorkItemTracking_Nodes_DeleteArea_Success()
        {
            // arrange
            ClassificationNodes request = new ClassificationNodes(_configuration);
            string masterArea           = System.Guid.NewGuid().ToString().ToUpper().Substring(0, 15) + "-MASTER";
            string deleteArea           = System.Guid.NewGuid().ToString().ToUpper().Substring(0, 15) + "-delete";

            // act
            GetNodeResponse.Node responseMaster = request.CreateArea(_configuration.Project, masterArea);
            GetNodeResponse.Node responseDelete = request.CreateArea(_configuration.Project, deleteArea);
            var responseMove = request.DeleteArea(_configuration.Project, deleteArea, responseMaster.id.ToString());

            //assert
            Assert.AreEqual(HttpStatusCode.Created, responseMaster.HttpStatusCode);
            Assert.AreEqual(HttpStatusCode.Created, responseDelete.HttpStatusCode);
            Assert.AreEqual(HttpStatusCode.NoContent, responseMove);

            request = null;
        }