コード例 #1
0
        /// <summary>
        /// Creates a new meeting workspace subsite.
        /// </summary>
        /// <param name="title">The title of the new meeting workspace.</param>
        /// <param name="templateName">The name of the template to use for the new meeting workspace.</param>
        /// <param name="lcid">The locale ID for the new workspace. Null if not specified.</param>
        /// <param name="timeZoneInformation">The time zone on the system of the meeting organizer.</param>
        /// <returns>The aggregation of CreateWorkspaceResponseCreateWorkspaceResult response or SoapException thrown.</returns>
        public SoapResult<CreateWorkspaceResponseCreateWorkspaceResult> CreateWorkspace(string title, string templateName, uint? lcid, TimeZoneInf timeZoneInformation)
        {
            CreateWorkspaceResponseCreateWorkspaceResult result = null;
            SoapException exception = null;
            try
            {
                // Call CreateWorkspace method.
                result = this.service.CreateWorkspace(title, templateName, lcid ?? 0, lcid.HasValue, timeZoneInformation);

                // As response successfully returned, the transport related requirements can be captured.
                this.CaptureTransportRelatedRequirements();
                this.ValidateAndCaptureCommonMessageSyntax();
                this.VerifyCreateWorkspaceResponse(result);
            }
            catch (SoapException ex)
            {
                exception = ex;

                // As response successfully returned, the transport related requirements can be captured.
                this.CaptureTransportRelatedRequirements();

                // Validate soap fault message structure and capture related requirements.
                this.ValidateAndCaptureSoapFaultRequirements(exception);
            }

            return new SoapResult<CreateWorkspaceResponseCreateWorkspaceResult>(result, exception);
        }
コード例 #2
0
        /// <summary>
        /// Creates a new meeting workspace subsite.
        /// </summary>
        /// <param name="title">The title of the new meeting workspace.</param>
        /// <param name="templateName">The name of the template to use for the new meeting workspace.</param>
        /// <param name="lcid">The locale ID for the new workspace. Null if not specified.</param>
        /// <param name="timeZoneInformation">The time zone on the system of the meeting organizer.</param>
        /// <returns>The aggregation of CreateWorkspaceResponseCreateWorkspaceResult response or SoapException thrown.</returns>
        public SoapResult <CreateWorkspaceResponseCreateWorkspaceResult> CreateWorkspace(string title, string templateName, uint?lcid, TimeZoneInf timeZoneInformation)
        {
            CreateWorkspaceResponseCreateWorkspaceResult result = null;
            SoapException exception = null;

            try
            {
                // Call CreateWorkspace method.
                result = this.service.CreateWorkspace(title, templateName, lcid ?? 0, lcid.HasValue, timeZoneInformation);

                // As response successfully returned, the transport related requirements can be captured.
                this.CaptureTransportRelatedRequirements();
                this.ValidateAndCaptureCommonMessageSyntax();
                this.VerifyCreateWorkspaceResponse(result);
            }
            catch (SoapException ex)
            {
                exception = ex;

                // As response successfully returned, the transport related requirements can be captured.
                this.CaptureTransportRelatedRequirements();

                // Validate soap fault message structure and capture related requirements.
                this.ValidateAndCaptureSoapFaultRequirements(exception);
            }

            return(new SoapResult <CreateWorkspaceResponseCreateWorkspaceResult>(result, exception));
        }
コード例 #3
0
        public void MSMEETS_S01_TC13_CreateWorkspaceWithAllParametersSpecified()
        {
            // Check whether creating workspace is supported and query available languages.
            SoapResult<GetMeetingsInformationResponseGetMeetingsInformationResult> getWorkspaceInfoResult = this.meetsAdapter.GetMeetingsInformation(MeetingInfoTypes.AllowCreate | MeetingInfoTypes.QueryLanguages, null);
            Site.Assert.IsNull(getWorkspaceInfoResult.Exception, "GetMeetingsInformation should succeed");
            Site.Assume.AreEqual<string>("true", getWorkspaceInfoResult.Result.MeetingsInformation.AllowCreate.ToLower(CultureInfo.CurrentCulture), "Site must support creating workspace");
            Site.Assume.AreNotEqual<int>(0, getWorkspaceInfoResult.Result.MeetingsInformation.ListTemplateLanguages.Length, "ListTemplateLanguages must contain one or more items.");
            string lcidString = getWorkspaceInfoResult.Result.MeetingsInformation.ListTemplateLanguages[0];
            uint lcid = 0;
            Site.Assert.IsTrue(uint.TryParse(lcidString, out lcid), "LCID must be integer");

            // Get available workspace templates.
            getWorkspaceInfoResult = this.meetsAdapter.GetMeetingsInformation(MeetingInfoTypes.QueryTemplates, lcid);
            Site.Assert.IsNull(getWorkspaceInfoResult.Exception, "GetMeetingsInformation should succeed");
            Site.Assert.AreNotEqual<int>(0, getWorkspaceInfoResult.Result.MeetingsInformation.ListTemplates.Length, "ListTemplates must contain one or more items.");
            Template template = getWorkspaceInfoResult.Result.MeetingsInformation.ListTemplates[0];

            // The templates returned in above are all server supported template, see the first template, template.Name is the short name of the template, MS-MEETS_R205 can be verified directly when it returns.
            Site.CaptureRequirementIfIsNotNull(
                template.Name,
                205,
                @"[In GetMeetingsInformationResponse]Name: The short name of the site template.");

            // The templates returned in above are all server supported template, see the first template, template.Title is the title of the template, MS-MEETS_R206 can be verified directly when it returns.
            Site.CaptureRequirementIfIsNotNull(
                template.Title,
                206,
                @"[In GetMeetingsInformationResponse]Title: The title of the site template.");

            // The templates returned in above are all server supported template, see the first template, template.Id is the identification number of the template, MS-MEETS_R207 can be verified directly when it returns.
            Site.CaptureRequirementIfIsNotNull(
                template.Id,
                207,
                @"[In GetMeetingsInformationResponse]Id: The identification number of the site template.");

             // The templates returned in above are all server supported template, see the first template, template.Description is the description of the template, MS-MEETS_R208 can be verified directly when it returns.
            Site.CaptureRequirementIfIsNotNull(
                template.Description,
                208,
                @"[In GetMeetingsInformationResponse]Description: A description of the site template.");

             // The templates returned in above are all server supported template, see the first template, template.ImageUrl is the URL of an image or icon of the template, MS-MEETS_R209 can be verified directly when it returns.
            Site.CaptureRequirementIfIsNotNull(
                template.ImageUrl,
                209,
                @"[In GetMeetingsInformationResponse]ImageUrl: The URL of an image or icon of the site template.");

            // Create a new workspace with all parameters specified.
            TimeZoneInf timeZoneInf = new TimeZoneInf();
            timeZoneInf.standardDate = new SysTime();
            timeZoneInf.standardDate.year = 2013;
            timeZoneInf.standardDate.month = 10;
            timeZoneInf.standardDate.dayOfWeek = 4;
            timeZoneInf.standardDate.day = 5;
            timeZoneInf.standardDate.hour = 23;
            timeZoneInf.standardDate.minute = 10;
            timeZoneInf.standardDate.second = 10;
            timeZoneInf.standardDate.milliseconds = 100;
            timeZoneInf.standardBias = 1;
            timeZoneInf.bias = 1;
            timeZoneInf.daylightBias = 2;
            timeZoneInf.daylightDate = new SysTime();
            timeZoneInf.standardDate.year = 0;
            timeZoneInf.standardDate.month = 10;
            timeZoneInf.standardDate.dayOfWeek = 4;
            timeZoneInf.standardDate.day = 5;
            timeZoneInf.standardDate.hour = 23;
            timeZoneInf.standardDate.minute = 10;
            timeZoneInf.standardDate.second = 10;
            timeZoneInf.standardDate.milliseconds = 100;
            SoapResult<CreateWorkspaceResponseCreateWorkspaceResult> createWorkspaceResult = this.meetsAdapter.CreateWorkspace(TestSuiteBase.GetUniqueWorkspaceTitle(), template.Name, lcid, timeZoneInf);
            Site.Assert.IsNull(createWorkspaceResult.Exception, "Create workspace should succeed");

            // In above CreateWorkspace step, the lcid value input is gained from getWorkspaceInfoResult, when CreateWorkspace succeed, MS-MEETS_R2935 can be verified. 
            Site.CaptureRequirement(
                2935,
                @"[In CreateWorkspace]If a value for this parameter [lcid] is provided, it MUST be a LCID contained in the GetMeetingsInformationResponse response after the client protocol sends the GetMeetingsInformation message with the requestFlags parameter set to 2.");

            // Clean up the SUT.
            this.meetsAdapter.Url = createWorkspaceResult.Result.CreateWorkspace.Url + Common.GetConfigurationPropertyValue("EntryUrl", this.Site);
            SoapResult<Null> deleteResult = this.meetsAdapter.DeleteWorkspace();
            Site.Assert.IsNull(deleteResult.Exception, "DeleteWorkspace should succeed");
        }