public void WindowsPhonePushNotificationMessageNullTest()
        {
            PushNotificationMessage message = null; // it is interesting that an abstract class can be set to null. never knew this.

            var result = PushNotifier.SendPushNotificationMessage(message);

            WindowsPhonePushNotificationMessageUnitTest.AssertOperationResultValidationResultsMessageCodeOnPushNotificationSendResult(result, ResultType.Success, false, false, "0001");
        }
        public void SendWindowsPhone7TilePushNotificationMessageTest()
        {
            var message = WindowsPhonePushNotificationMessageUnitTest.GetValidWindowsPhoneTilePushNotificationMessage();

            var result = PushNotifier.SendPushNotificationMessage(message);

            WindowsPhonePushNotificationMessageUnitTest.AssertOperationResultValidationResultsMessageCodeOnPushNotificationSendResult(result, ResultType.Success, true, true);
        }
        public void WindowsPhoneToastPushNotificationMessageParamLengthGreaterThan256Test()
        {
            var message = WindowsPhonePushNotificationMessageUnitTest.GetValidWindowsPhoneToastPushNotificationMessage();

            message.Param = "/MainPage.xaml?v=" + new String('a', 256);

            var result = PushNotifier.SendPushNotificationMessage(message);

            WindowsPhonePushNotificationMessageUnitTest.AssertOperationResultValidationResultsMessageCodeOnPushNotificationSendResult(result, ResultType.Success, false, false, "0003");
        }
        public void WindowsPhoneTilePushNotificationMessageCountGreaterThan99Test()
        {
            var message = WindowsPhonePushNotificationMessageUnitTest.GetValidWindowsPhoneTilePushNotificationMessage();

            message.Count = 100;

            var result = PushNotifier.SendPushNotificationMessage(message);

            WindowsPhonePushNotificationMessageUnitTest.AssertOperationResultValidationResultsMessageCodeOnPushNotificationSendResult(result, ResultType.Success, false, true, "0008");
        }
        public void WindowsPhonePushNotificationMessageMessagePriorityNoneTest()
        {
            var message = WindowsPhonePushNotificationMessageUnitTest.GetValidWindowsPhoneToastPushNotificationMessage();

            message.MessagePriority = MessagePriority.None;

            var result = PushNotifier.SendPushNotificationMessage(message);

            WindowsPhonePushNotificationMessageUnitTest.AssertOperationResultValidationResultsMessageCodeOnPushNotificationSendResult(result, ResultType.Success, false, false, "0011");
        }
        public void WindowsPhonePushNotificationMessageNotificationUriNullTest()
        {
            var message = WindowsPhonePushNotificationMessageUnitTest.GetValidWindowsPhoneToastPushNotificationMessage();

            message.NotificationUri = null;

            var result = PushNotifier.SendPushNotificationMessage(message);

            WindowsPhonePushNotificationMessageUnitTest.AssertOperationResultValidationResultsMessageCodeOnPushNotificationSendResult(result, ResultType.Success, false, false, "0010");
        }
        public void WindowsPhoneToastPushNotificationMessageParamForWindowsPhone7_0Test()
        {
            var message = WindowsPhonePushNotificationMessageUnitTest.GetValidWindowsPhoneToastPushNotificationMessage();

            message.SupportWindowsPhone7_0 = true;
            message.Param = "/MainPage.xaml";

            var result = PushNotifier.SendPushNotificationMessage(message);

            WindowsPhonePushNotificationMessageUnitTest.AssertOperationResultValidationResultsMessageCodeOnPushNotificationSendResult(result, ResultType.Success, false, true, "0004");
        }
        public void WindowsPhoneTilePushNotificationMessageBackContentForWindowsPhone7_0Test()
        {
            var message = WindowsPhonePushNotificationMessageUnitTest.GetValidWindowsPhoneTilePushNotificationMessage();

            message.SupportWindowsPhone7_0 = true;
            message.BackContent            = "Back Content - Profile Image";

            var result = PushNotifier.SendPushNotificationMessage(message);

            WindowsPhonePushNotificationMessageUnitTest.AssertOperationResultValidationResultsMessageCodeOnPushNotificationSendResult(result, ResultType.Success, false, true, "0007");
        }
        public void WindowsPhoneTilePushNotificationMessageBackBackgroundImageUriForWindowsPhone7_0Test()
        {
            var message = WindowsPhonePushNotificationMessageUnitTest.GetValidWindowsPhoneTilePushNotificationMessage();

            message.SupportWindowsPhone7_0 = true;
            message.BackBackgroundImageUri = "http://download-codeplex.sec.s-msft.com/download/Avatar.ashx?DownloadId=266566";

            var result = PushNotifier.SendPushNotificationMessage(message);

            WindowsPhonePushNotificationMessageUnitTest.AssertOperationResultValidationResultsMessageCodeOnPushNotificationSendResult(result, ResultType.Success, false, true, "0005");
        }
        public void WindowsPhonePushNotificationMessageX509CertificateNullTest()
        {
            var message = WindowsPhonePushNotificationMessageUnitTest.GetValidWindowsPhoneToastPushNotificationMessage();

            message.AuthenticationSettings = new WindowsPhoneAuthenticationSettings()
            {
                EnableAuthentication = true,
                X509Certificate      = null,
            };

            var result = PushNotifier.SendPushNotificationMessage(message);

            WindowsPhonePushNotificationMessageUnitTest.AssertOperationResultValidationResultsMessageCodeOnPushNotificationSendResult(result, ResultType.Success, false, false, "0009");
        }
        public void Execute(params object[] list)
        {
//			var toastMessage = new MyToast();
//			toastMessage.Text1 = ((string)list[1]);
//			toastMessage.Text2 = ((string)list[2]);
//			toastMessage.NotificationUri = (string)list [0];
//			toastMessage.CreatePayload ();
//			var result = PushNotifier.SendPushNotificationMessage(toastMessage);
            var tileMessage = new MyTile();

            tileMessage.Text1           = ((string)list[1]);
            tileMessage.Text2           = ((string)list[2]);
            tileMessage.NotificationUri = (string)list [0];
            tileMessage.CreatePayload();
            var result2 = PushNotifier.SendPushNotificationMessage(tileMessage);

            //throw new NotImplementedException ();
        }