Microsoft.Protocols.TestSuites.MS_ASTASK.S01_SyncCommand.MSASTASK_S01_TC11_CreateTaskItemWithInvalidReminderSetElement C# (CSharp) Method

MSASTASK_S01_TC11_CreateTaskItemWithInvalidReminderSetElement() private method

        public void MSASTASK_S01_TC11_CreateTaskItemWithInvalidReminderSetElement()
        {
            #region Call Sync command to create task item with an invalid ReminderSet value.

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

            // Set an invalid ReminderSet value.
            taskItem.Add(Request.ItemsChoiceType8.ReminderSet, (byte)2);
            SyncStore syncResponse = this.SyncAddTask(taskItem);

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

            #endregion

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

            // Verify MS-ASTASK requirement: MS-ASTASK_R252
            // If the ReminderSet contains a value other than 0 (zero) or 1 in a command request, and the Status in the command response is 6,this requirement can be covered.
            Site.CaptureRequirementIfAreEqual<int>(
                6,
                int.Parse(syncResponse.AddResponses[0].Status),
                252,
                @"[In  ReminderSet]If the ReminderSet element contains a value other than 0 (zero) or 1 in a command request, the server responds with a status value of 6 in the command response.");
        }