public void MSASTASK_S01_TC13_CreateTaskItemFailWithWeekOfMonth()
        {
            #region Call Sync command to create task item with Type element set to 0 and WeekOfMonth set.

            Dictionary<Request.ItemsChoiceType8, object> taskItem = new Dictionary<Request.ItemsChoiceType8, object>();
            string subject = Common.GenerateResourceName(Site, "subject");

            taskItem.Add(Request.ItemsChoiceType8.Subject2, subject);
            Request.Recurrence1 recurrence = new Request.Recurrence1
            {
                Type = 0,
                Start = DateTime.Now,
                OccurrencesSpecified = true,
                Occurrences = 2,
                DayOfWeekSpecified = true,
                DayOfWeek = 1,
                WeekOfMonthSpecified = true,
                WeekOfMonth = 2
            };

            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            SyncStore syncResponse = this.SyncAddTask(taskItem);

            Site.Assert.AreEqual<int>(6, int.Parse(syncResponse.AddResponses[0].Status), "Status code 6 should be returned when Type element value is 0 and WeekOfMonth is set.");

            #endregion

            #region Call Sync command to create task item with Type element set to 1 and WeekOfMonth set.

            taskItem = new Dictionary<Request.ItemsChoiceType8, object> { { Request.ItemsChoiceType8.Subject2, subject } };
            recurrence = new Request.Recurrence1
            {
                Type = 1,
                Start = DateTime.Now,
                DayOfWeekSpecified = true,
                DayOfWeek = 1,
                WeekOfMonthSpecified = true,
                WeekOfMonth = 2
            };

            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            syncResponse = this.SyncAddTask(taskItem);

            Site.Assert.AreEqual<int>(6, int.Parse(syncResponse.AddResponses[0].Status), "Status code 6 should be returned when Type element value is 1 and WeekOfMonth is set.");

            #endregion

            #region Call Sync command to create task item with Type element set to 2 and WeekOfMonth set.

            taskItem = new Dictionary<Request.ItemsChoiceType8, object> { { Request.ItemsChoiceType8.Subject2, subject } };
            recurrence = new Request.Recurrence1
            {
                Type = 2,
                Start = DateTime.Now,
                DayOfMonthSpecified = true,
                DayOfMonth = 10,
                WeekOfMonthSpecified = true,
                WeekOfMonth = 2
            };

            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            syncResponse = this.SyncAddTask(taskItem);

            Site.Assert.AreEqual<int>(6, int.Parse(syncResponse.AddResponses[0].Status), "Status code 6 should be returned when Type element value is 2 and WeekOfMonth is set.");

            #endregion

            #region Call Sync command to create task item with Type element set to 5 and WeekOfMonth set.

            taskItem = new Dictionary<Request.ItemsChoiceType8, object> { { Request.ItemsChoiceType8.Subject2, subject } };
            recurrence = new Request.Recurrence1
            {
                Type = 5,
                Start = DateTime.Now,
                DayOfMonthSpecified = true,
                DayOfMonth = 10,
                MonthOfYearSpecified = true,
                MonthOfYear = 2,
                WeekOfMonthSpecified = true,
                WeekOfMonth = 2
            };

            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            syncResponse = this.SyncAddTask(taskItem);

            Site.Assert.AreEqual<int>(6, int.Parse(syncResponse.AddResponses[0].Status), "Status code 6 should be returned when Type element value is 5 and WeekOfMonth is set.");

            #endregion

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R320");

            // Verify MS-ASTASK requirement: MS-ASTASK_R320
            // If the Type element value is in {0,1,2,5}, and the server responds with a status 6 error (conversion error),this requirement can be covered.
            Site.CaptureRequirement(
                320,
                @"[In WeekOfMonth] When a client's request is issued with the WeekOfMonth element in other instances[when the Type element value is not either 3 or 6], the server responds with a status 6 error (conversion error).");
        }
        public void MSASTASK_S01_TC14_CreateTaskItemFailWithCalendarType()
        {
            Site.Assume.AreNotEqual<string>("12.1", Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", this.Site), "The FirstDayOfWeek element is not supported when the MS-ASProtocolVersion header is set to 12.1. MS-ASProtocolVersion header value is determined using Common PTFConfig property named ActiveSyncProtocolVersion.");
            Site.Assume.AreNotEqual<string>("14.0", Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", this.Site), "The FirstDayOfWeek element is not supported when the MS-ASProtocolVersion header is set to 14.0. MS-ASProtocolVersion header value is determined using Common PTFConfig property named ActiveSyncProtocolVersion.");

            #region Call Sync command to create task item with Type element set to 0 and CalendarType set.

            Dictionary<Request.ItemsChoiceType8, object> taskItem = new Dictionary<Request.ItemsChoiceType8, object>();
            string subject = Common.GenerateResourceName(Site, "subject");

            taskItem.Add(Request.ItemsChoiceType8.Subject2, subject);
            Request.Recurrence1 recurrence = new Request.Recurrence1
            {
                Type = 0,
                Start = DateTime.Now,
                OccurrencesSpecified = true,
                Occurrences = 2,
                DayOfWeekSpecified = true,
                DayOfWeek = 1,
                CalendarType = 0,
                CalendarTypeSpecified = true
            };

            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            SyncStore syncResponse = this.SyncAddTask(taskItem);

            Site.Assert.AreEqual<int>(6, int.Parse(syncResponse.AddResponses[0].Status), "Status code 6 should be returned when Type element value is 0 and CalendarType is set.");

            #endregion

            #region Call Sync command to create task item with Type element set to 1 and CalendarType set.

            taskItem = new Dictionary<Request.ItemsChoiceType8, object> { { Request.ItemsChoiceType8.Subject2, subject } };
            recurrence = new Request.Recurrence1
            {
                Type = 1,
                Start = DateTime.Now,
                DayOfWeekSpecified = true,
                DayOfWeek = 1,
                CalendarType = 0,
                CalendarTypeSpecified = true
            };

            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            syncResponse = this.SyncAddTask(taskItem);

            Site.Assert.AreEqual<int>(6, int.Parse(syncResponse.AddResponses[0].Status), "Status code 6 should be returned when Type element value is 1 and CalendarType is set.");

            #endregion

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R81");

            // Verify MS-ASTASK requirement: MS-ASTASK_R81
            // If the Type element value is not in {2,3,5,6} and the CalendarType element is included, the server responds with a status 6 error (conversion error), this requirement can be covered.
            Site.CaptureRequirement(
                81,
                @"[In CalendarType] If the CalendarType element is included in other instances[when the Type element is not set to a value of 2, 3, 5, or 6 ], the server responds with a status 6 error (conversion error).");
        }
        public void MSASTASK_S01_TC08_CreateTaskItemRecursWeeklyWithInvalidFirstDayOfWeek()
        {
            Site.Assume.AreNotEqual<string>("12.1", Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", this.Site), "The FirstDayOfWeek element is not supported when the MS-ASProtocolVersion header is set to 12.1. MS-ASProtocolVersion header value is determined using Common PTFConfig property named ActiveSyncProtocolVersion.");
            Site.Assume.AreNotEqual<string>("14.0", Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", this.Site), "The FirstDayOfWeek element is not supported when the MS-ASProtocolVersion header is set to 14.0. MS-ASProtocolVersion header value is determined using Common PTFConfig property named ActiveSyncProtocolVersion.");

            #region Call Sync command to create task item with Type element set to 1 and an invalid FirstDayOfWeek value.

            Dictionary<Request.ItemsChoiceType8, object> taskItem = new Dictionary<Request.ItemsChoiceType8, object>();
            string subject = Common.GenerateResourceName(Site, "subject");

            taskItem.Add(Request.ItemsChoiceType8.Subject2, subject);
            Request.Recurrence1 recurrence = new Request.Recurrence1
            {
                Type = 1,
                Start = DateTime.Now,
                OccurrencesSpecified = true,
                Occurrences = 2,
                DayOfWeekSpecified = true,
                DayOfWeek = 1,
                FirstDayOfWeekSpecified = true,
                FirstDayOfWeek = 7
            };

            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            SyncStore syncResponse = this.SyncAddTask(taskItem);

            Site.Assert.AreEqual<int>(6, int.Parse(syncResponse.AddResponses[0].Status), "Status code 6 should be returned when an invalid FirstDayOfWeek element value is set.");

            #endregion

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R171");

            // Verify MS-ASTASK requirement: MS-ASTASK_R171
            // If the FirstDayOfWeek element value is not between 0 and 6, and the server responds with a status 6 error (conversion error),this requirement can be covered.
            Site.CaptureRequirement(
                171,
                @"[In FirstDayOfWeek] If the client uses the Sync command request ([MS-ASCMD] section 2.2.2.19) to transmit a value not included in this table[the value is between 0 to 6], then the server MUST return protocol status error 6.");
        }
        public void MSASTASK_S01_TC12_CreateTaskItemRecursMonthlyOnTheNthDay()
        {
            #region Call Sync command to create task item which recurs monthly on the nth day.

            Dictionary<Request.ItemsChoiceType8, object> taskItem = new Dictionary<Request.ItemsChoiceType8, object>();
            string subject = Common.GenerateResourceName(Site, "subject");

            taskItem.Add(Request.ItemsChoiceType8.Subject2, subject);

            Request.Recurrence1 recurrence = new Request.Recurrence1
            {
                Type = 3,
                Start = DateTime.Now,
                UntilSpecified = true,
                DayOfWeekSpecified = true,
                DayOfWeek = 1,
                WeekOfMonthSpecified = true,
                WeekOfMonth = 2
            };
            recurrence.Until = recurrence.Start.AddMonths(3);

            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);

            SyncStore syncResponse = this.SyncAddTask(taskItem);
            Site.Assert.AreEqual<int>(1, int.Parse(syncResponse.AddResponses[0].Status), "Task item should be created successfully.");

            ItemsNeedToDelete.Add(subject);
            #endregion

            #region Call Sync command to get the task item.

            SyncItem syncedTaskItem = this.GetChangeItem(this.UserInformation.TasksCollectionId, subject);
            Site.Assert.IsNotNull(syncedTaskItem.Task, "The task which subject is {0} should exist in server.", subject);

            #endregion

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R530");

            // Verify MS-ASTASK requirement: MS-ASTASK_R530
            // If DayOfWeekSpecified is true, DayOfWeek element is returned from server.
            Site.CaptureRequirementIfIsTrue(
                syncedTaskItem.Task.Recurrence.DayOfWeekSpecified,
                530,
                @"[In DayOfWeek] A command [request or] response has a minimum of one DayOfWeek element per Recurrence element when the Type element value is [1,] 3[, or 6].");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R430");

            // Verify MS-ASTASK requirement: MS-ASTASK_R430
            // If WeekOfMonthSpecified is true, WeekOfMonth element is returned from server.
            Site.CaptureRequirementIfIsTrue(
                syncedTaskItem.Task.Recurrence.WeekOfMonthSpecified,
                430,
                @"[In WeekOfMonth] A command [request or] response has a minimum of one WeekOfMonth child element per Recurrence element when the value of the Type element (section 2.2.2.27) is [either] 3 [or 6].");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R319");

            // Verify MS-ASTASK requirement: MS-ASTASK_R319
            // If WeekOfMonthSpecified is true, WeekOfMonth element is returned from server.
            Site.CaptureRequirementIfIsTrue(
                syncedTaskItem.Task.Recurrence.WeekOfMonthSpecified,
                319,
                @"[In WeekOfMonth] The WeekOfMonth element MUST only be included in [requests or] responses when the Type element value is [either] 3 [or 6].");
        }
        public void MSASTASK_S01_TC07_CreateTaskItemFailWithDayOfWeek()
        {
            #region Call Sync command to create task item with Type element set to 2 and DayOfWeek element set

            Dictionary<Request.ItemsChoiceType8, object> taskItem = new Dictionary<Request.ItemsChoiceType8, object>();
            string subject = Common.GenerateResourceName(Site, "subject");

            taskItem.Add(Request.ItemsChoiceType8.Subject2, subject);
            Request.Recurrence1 recurrence = new Request.Recurrence1
            {
                Type = 2,
                Start = DateTime.Now,
                OccurrencesSpecified = true,
                Occurrences = 2,
                DayOfWeekSpecified = true,
                DayOfWeek = 1,
                DayOfMonthSpecified = true,
                DayOfMonth = 10
            };
            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            SyncStore syncResponse = this.SyncAddTask(taskItem);

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R532");

            Site.CaptureRequirementIfAreEqual<int>(
                6,
                int.Parse(syncResponse.AddResponses[0].Status),
                532,
                "[In DayOfWeek] If a request is issued with the DayOfWeek element when the Type element value is 2 [or 5], the server responds with a status 6 error (conversion error). ");

            #endregion

            #region Call Sync command to create task item with Type element set to 5 and DayOfWeek element set

            taskItem = new Dictionary<Request.ItemsChoiceType8, object> { { Request.ItemsChoiceType8.Subject2, subject } };
            recurrence = new Request.Recurrence1
            {
                Type = 5,
                Start = DateTime.Now,
                DayOfMonthSpecified = true,
                DayOfMonth = 10,
                MonthOfYearSpecified = true,
                MonthOfYear = 5,
                DayOfWeekSpecified = true,
                DayOfWeek = 1
            };
            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            syncResponse = this.SyncAddTask(taskItem);

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R533");

            Site.CaptureRequirementIfAreEqual<int>(
                6,
                int.Parse(syncResponse.AddResponses[0].Status),
                533,
                "[In DayOfWeek] If a request is issued with the DayOfWeek element when the Type element value is [2 or] 5, the server responds with a status 6 error (conversion error). ");

            #endregion
        }
        public void MSASTASK_S01_TC05_CreateTaskItemRecursYearly()
        {
            #region Call Sync command to create a task item with Recurrence whose Type element is recurs yearly.

            Dictionary<Request.ItemsChoiceType8, object> taskItem = new Dictionary<Request.ItemsChoiceType8, object>();
            string subject = Common.GenerateResourceName(Site, "subject");

            taskItem.Add(Request.ItemsChoiceType8.Subject2, subject);
            taskItem.Add(Request.ItemsChoiceType8.Importance1, (byte)2);
            Request.Recurrence1 recurrence = new Request.Recurrence1
            {
                Type = 5,
                Start = DateTime.Now,
                UntilSpecified = true,
                DayOfMonthSpecified = true,
                DayOfMonth = 10,
                MonthOfYearSpecified = true,
                MonthOfYear = 2
            };
            recurrence.Until = recurrence.Start.AddYears(3);

            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            SyncStore syncResponse = this.SyncAddTask(taskItem);

            Site.Assert.AreEqual<int>(1, int.Parse(syncResponse.AddResponses[0].Status), "Task item should be created successfully.");

            ItemsNeedToDelete.Add(subject);

            #endregion

            #region Call Sync command to get the task item.

            SyncItem syncedTaskItem = this.GetChangeItem(this.UserInformation.TasksCollectionId, subject);
            Site.Assert.IsNotNull(syncedTaskItem.Task, "The task which subject is {0} should exist in server.", subject);

            #endregion

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R406");

            // Verify MS-ASTASK requirement: MS-ASTASK_R406
            // If DayOfMonthSpecified is true, DayOfMonth element is returned from server.
            Site.CaptureRequirementIfIsTrue(
                syncedTaskItem.Task.Recurrence.DayOfMonthSpecified,
                406,
                @"[In DayOfMonth] A command [request or] response has a minimum of one DayOfMonth element per Recurrence element if the value of the Type element (section 2.2.2.27) is [2 or] 5.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R410");

            // Verify MS-ASTASK requirement: MS-ASTASK_R410
            // If DayOfMonthSpecified is true, DayOfMonth element is returned from server.
            Site.CaptureRequirementIfIsTrue(
                syncedTaskItem.Task.Recurrence.DayOfMonthSpecified,
                410,
                @"[In DayOfMonth] The DayOfMonth element MUST only be included in [requests or] responses when the Type element value is [2 or] 5.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R417");

            // Verify MS-ASTASK requirement: MS-ASTASK_R417
            // If MonthOfYearSpecified is true, MonthOfYear element is returned from server.
            Site.CaptureRequirementIfIsTrue(
                syncedTaskItem.Task.Recurrence.MonthOfYearSpecified,
                417,
                @"[In MonthOfYear] A command [request or] response has a minimum of one MonthofYear child element per Recurrence element if the value of the Type element (section 2.2.2.27) is [either] 5 [or 6].");
        }
        public void MSASTASK_S01_TC04_CreateTaskItemRecursMonthly()
        {
            #region Call Sync command to create a task with Recurrence whose Type element is recurs monthly.

            Dictionary<Request.ItemsChoiceType8, object> taskItem = new Dictionary<Request.ItemsChoiceType8, object>();
            string subject = Common.GenerateResourceName(Site, "subject");

            taskItem.Add(Request.ItemsChoiceType8.Subject2, subject);
            taskItem.Add(Request.ItemsChoiceType8.Importance1, (byte)1);
            Request.Categories4 categories = new Request.Categories4 { Category = "Business,Waiting".Split(',') };
            taskItem.Add(Request.ItemsChoiceType8.Categories3, categories);

            Request.Recurrence1 recurrence = new Request.Recurrence1
            {
                Type = 2,
                Start = DateTime.Now,
                UntilSpecified = true,
                DayOfMonthSpecified = true,
                DayOfMonth = 10
            };
            recurrence.Until = recurrence.Start.AddMonths(3);

            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            SyncStore syncResponse = this.SyncAddTask(taskItem);

            Site.Assert.AreEqual<int>(1, int.Parse(syncResponse.AddResponses[0].Status), "Task item should be created successfully.");

            ItemsNeedToDelete.Add(subject);

            #endregion

            #region Call Sync command to get the task item.

            SyncItem syncedTaskItem = this.GetChangeItem(this.UserInformation.TasksCollectionId, subject);
            Site.Assert.IsNotNull(syncedTaskItem.Task, "The task which subject is {0} should exist in server.", subject);

            #endregion

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R404");

            // Verify MS-ASTASK requirement: MS-ASTASK_R404
            // If DayOfMonthSpecified is true, DayOfMonth element is returned from server.
            Site.CaptureRequirementIfIsTrue(
                syncedTaskItem.Task.Recurrence.DayOfMonthSpecified,
                404,
                @"[In DayOfMonth] A command [request or] response has a minimum of one DayOfMonth element per Recurrence element if the value of the Type element (section 2.2.2.27) is 2 [or 5].");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R409");

            // Verify MS-ASTASK requirement: MS-ASTASK_R409
            // If DayOfMonthSpecified is true, DayOfMonth element is returned from server.
            Site.CaptureRequirementIfIsTrue(
                syncedTaskItem.Task.Recurrence.DayOfMonthSpecified,
                409,
                @"[In DayOfMonth] The DayOfMonth element MUST only be included in [requests or] responses when the Type element value is 2 [or 5].");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R366");

            // Verify MS-ASTASK requirement: MS-ASTASK_R366
            // If response is returned from server successfully, this requirement can be captured.
            Site.CaptureRequirementIfAreEqual<int>(
                1,
                int.Parse(syncResponse.AddResponses[0].Status),
                366,
                @"[In Sync Command Response] When a client uses the Sync command request ([MS-ASCMD] section 2.2.2.19) to synchronize its Task class items for a specified user with the tasks currently stored by the server, as specified in section 3.1.5.3, the server responds with a Sync command response ([MS-ASCMD] section 2.2.2.19).");
        }
        public void MSASTASK_S01_TC23_CreateTaskItemRecursYearlyOnTheNthDayWithCalendarTypeReturned()
        {
            Site.Assume.AreNotEqual<string>("12.1", Common.GetConfigurationPropertyValue("ActiveSyncProtocolVersion", this.Site), "The CalendarType element is not supported when the MS-ASProtocolVersion header is set to 12.1. MS-ASProtocolVersion header value is determined using Common PTFConfig property named ActiveSyncProtocolVersion.");

            #region Call Sync command to create task item which recurs yearly on the nth day and with CalendarType set.

            Dictionary<Request.ItemsChoiceType8, object> taskItem = new Dictionary<Request.ItemsChoiceType8, object>();
            string subject = Common.GenerateResourceName(Site, "subject");

            taskItem.Add(Request.ItemsChoiceType8.Subject2, subject);
            Request.Recurrence1 recurrence = new Request.Recurrence1
            {
                Type = 6,
                Start = DateTime.Now,
                OccurrencesSpecified = true,
                Occurrences = 4,
                DayOfWeekSpecified = true,
                DayOfWeek = 3,
                WeekOfMonthSpecified = true,
                WeekOfMonth = 2,
                MonthOfYearSpecified = true,
                MonthOfYear = 10
            };
            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);
            SyncStore syncResponse = this.SyncAddTask(taskItem);

            Site.Assert.AreEqual<int>(1, int.Parse(syncResponse.AddResponses[0].Status), "Task item should be created successfully.");

            ItemsNeedToDelete.Add(subject);

            #endregion

            #region Call Sync command to get the task item.

            SyncItem syncedTaskItem = this.GetChangeItem(this.UserInformation.TasksCollectionId, subject);
            Site.Assert.IsNotNull(syncedTaskItem.Task, "The task which subject is {0} should exist in server.", subject);

            #endregion

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R8213");

            // Verify MS-ASTASK requirement: MS-ASTASK_R8213
            // If CalendarTypeSpecified is true, CalendarType element is returned from server.
            Site.CaptureRequirementIfIsTrue(
                syncedTaskItem.Task.Recurrence.CalendarTypeSpecified,
                8213,
                @"[In CalendarType] A command response has a minimum of one CalendarType child element per Recurrence element when the Type element is set to a value of 6;");
        }
        public void MSASTASK_S01_TC02_CreateTaskItemRecursDailyWithoutStart()
        {
            #region Call Sync command to create task item without start time

            Dictionary<Request.ItemsChoiceType8, object> taskItem = new Dictionary<Request.ItemsChoiceType8, object>();
            string subject = Common.GenerateResourceName(Site, "subject");

            taskItem.Add(Request.ItemsChoiceType8.Subject2, subject);

            Request.Recurrence1 recurrence = new Request.Recurrence1
            {
                Type = 0,
                OccurrencesSpecified = true,
                Occurrences = 2,
                DayOfWeekSpecified = true,
                DayOfWeek = 1
            };
            taskItem.Add(Request.ItemsChoiceType8.Recurrence1, recurrence);

            SyncStore syncResponse = this.SyncAddTask(taskItem);

            #endregion

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-ASTASK_R37011");

            // Verify MS-ASTASK requirement: MS-ASTASK_R37011
            // If the Start is not specified in the request, and the Status in the response is 6, this requirement can be covered.
            Site.CaptureRequirementIfAreEqual<int>(
                6,
                int.Parse(syncResponse.AddResponses[0].Status),
                37011,
                @"[In Start Element] If a client does not include the Start element, as specified in section 2.2.2.23, in a Sync command request ([MS-ASCMD] section 2.2.2.19) whenever a Recurrence element is present, then the server MUST respond with status error 6.");
        }