public void MSMEETS_S04_TC02_RecurringMeetingError()
{
// Create a workspace.
string workspaceTitle = TestSuiteBase.GetUniqueWorkspaceTitle();
SoapResult<CreateWorkspaceResponseCreateWorkspaceResult> createWorkspaceResult = this.meetsAdapter.CreateWorkspace(workspaceTitle, null, null, null);
Site.Assert.IsNull(createWorkspaceResult.Exception, "Create workspace should succeed");
// Add a single instance meeting in the workspace.
this.meetsAdapter.Url = createWorkspaceResult.Result.CreateWorkspace.Url + Common.GetConfigurationPropertyValue("EntryUrl", this.Site);
string organizerEmail = Common.GetConfigurationPropertyValue("OrganizerEmail", this.Site);
string meetingTitle = TestSuiteBase.GetUniqueMeetingTitle();
string meetingLocation = TestSuiteBase.GetUniqueMeetingLocation();
SoapResult<AddMeetingResponseAddMeetingResult> addMeetingResult = this.meetsAdapter.AddMeeting(organizerEmail, Guid.NewGuid().ToString(), null, DateTime.Now, meetingTitle, meetingLocation, DateTime.Now, DateTime.Now.AddHours(1), false);
Site.Assert.IsNull(addMeetingResult.Exception, "AddMeeting should succeed");
// Add a recurring meeting in the same workspace.
string icalendar = TestSuiteBase.GetICalendar(Guid.NewGuid().ToString(), true);
SoapResult<AddMeetingFromICalResponseAddMeetingFromICalResult> addMeetingFromICalResult = this.meetsAdapter.AddMeetingFromICal(organizerEmail, icalendar);
// Add the log information.
Site.Log.Add(Microsoft.Protocols.TestTools.LogEntryKind.Comment, "Verify MS-MEETS_R89: The response when a client tries to add a recurring meeting to a workspace is: {0}", addMeetingFromICalResult.Exception.Detail.InnerText);
// If a SOAP fault with SOAP fault code "0x00000003" is returned, MS-MEETS_R89 is captured.
Site.CaptureRequirementIfAreEqual<string>(
"0x00000003",
addMeetingFromICalResult.GetErrorCode(),
89,
@"[In AddMeetingFromICalResponse]If the protocol client tries to add a recurring meeting to a workspace that already contains a meeting, the response MUST be a SOAP fault with SOAP fault code ""0x00000003"".");
// 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");
}
#endregion