示例#1
0
        public void MSWWSP_S02_TC04_GetWorkflowTaskData_Success()
        {
            // Upload a file.
            string uploadFileUrl = this.UploadFileToSut(DocLibraryName);

            this.VerifyTaskDataOfNewUploadFile(uploadFileUrl);

            // Start a normal work flow
            string taskIdValue = this.StartATaskWithNewFile(uploadFileUrl, false);

            // Verify whether the task is assign to expected user group for new uploaded file, only have one task currently.
            this.VerifyAssignToValueForSingleTodoItem(uploadFileUrl, 0);

            // Call method GetWorkflowTaskData to retrieve data about a single workflow task.
            GetWorkflowTaskDataResponseGetWorkflowTaskDataResult askDataResult = ProtocolAdapter.GetWorkflowTaskData(uploadFileUrl, int.Parse(taskIdValue), new Guid(TaskListId));

            // If the response from the GetWorkflowTaskData is not null, then R295 should be covered.
            // Verify MS-WWSP requirement: MS-WWSP_R295
            Site.CaptureRequirementIfIsNotNull(
                askDataResult,
                295,
                @"[In GetWorkflowTaskData] The protocol client sends a GetWorkflowTaskDataSoapIn request message, and the protocol server responds with a GetWorkflowTaskDataSoapOut response message.");

            // For a new upload file, start only one task currently, if the GetWorkflowTaskData operation return only one record of the task, then R411, R292, R196, R298 and R307 should be covered.
            // Verify MS-WWSP requirement: MS-WWSP_R411
            Site.CaptureRequirementIfAreEqual(
                1,
                askDataResult.Any.Length,
                411,
                @"[In Message Processing Events and Sequencing Rules] GetWorkflowTaskData retrieves data about a single workflow task.");

            // Verify MS-WWSP requirement: MS-WWSP_R292
            Site.CaptureRequirementIfAreEqual(
                1,
                askDataResult.Any.Length,
                292,
                @"[In GetWorkflowTaskData] This operation retrieves data about a single workflow task.");

            // Verify MS-WWSP requirement: MS-WWSP_R196
            Site.CaptureRequirementIfAreEqual(
                1,
                askDataResult.Any.Length,
                196,
                @"[In GetWorkflowDataForItem] This operation[GetWorkflowDataForItem] retrieves some of the same data that GetToDosForItem and GetTemplatesForItem retrieve, as well as additional data.");

            // Verify MS-WWSP requirement: MS-WWSP_R298
            Site.CaptureRequirementIfAreEqual(
                1,
                askDataResult.Any.Length,
                298,
                @"[In Messages] GetWorkflowTaskDataSoapOut specifies the response to a request to retrieve data about a single workflow task.");

            // Verify MS-WWSP requirement: MS-WWSP_R307
            Site.CaptureRequirementIfAreEqual(
                1,
                askDataResult.Any.Length,
                307,
                @"[In Elements] GetWorkflowTaskDataResponse contains the response to a request to retrieve data about a single workflow task.");
        }
示例#2
0
        public void MSWWSP_S02_TC05_GetWorkflowTaskData_IgnoreItem()
        {
            // Upload a file.
            string uploadFileUrl = this.UploadFileToSut(DocLibraryName);

            this.VerifyTaskDataOfNewUploadFile(uploadFileUrl);

            // Start a normal work flow
            string taskIdValue = this.StartATaskWithNewFile(uploadFileUrl, false);

            // Verify whether the task is assign to expected user group. for new uploaded file, only have one task currently.
            this.VerifyAssignToValueForSingleTodoItem(uploadFileUrl, 0);

            // Call method GetWorkflowTaskData to retrieve data about a single workflow task.
            GetWorkflowTaskDataResponseGetWorkflowTaskDataResult askDataResult = ProtocolAdapter.GetWorkflowTaskData(uploadFileUrl, int.Parse(taskIdValue), new Guid(TaskListId));

            if (askDataResult == null || askDataResult.Any.Length == 0)
            {
                this.Site.Assume.Fail("GetWorkflowTaskData operation is failed, the response is null.");
            }

            // Initialize an invalid file URL.
            string notExistFileUrl = this.GenerateRandomValue().ToString();

            GetWorkflowTaskDataResponseGetWorkflowTaskDataResult askDataResultInvalieURL = ProtocolAdapter.GetWorkflowTaskData(notExistFileUrl, int.Parse(taskIdValue), new Guid(TaskListId));

            if (askDataResultInvalieURL == null || askDataResultInvalieURL.Any.Length == 0)
            {
                this.Site.Assume.Fail("GetWorkflowTaskData operation is failed when the file URL is not existing.");
            }

            // Call method GetWorkflowTaskData to retrieve data about a single workflow task, with an invalid URL.
            // If the server replay the same, then R313 should be covered.
            // Verify MS-WWSP requirement: MS-WWSP_R313
            Site.CaptureRequirementIfAreEqual(
                askDataResult.Any.Length,
                askDataResultInvalieURL.Any.Length,
                313,
                @"[In GetWorkflowTaskData] Set the different string as the item value, server reply same if the site (2) of the SOAP request URL contains a list with the specified ListId.");
        }