Exemplo n.º 1
0
        public void ValidateSecondaryTile_ThrowsOnNullTemplateValue()
        {
            bool testPass = false;
            NotificationSecondaryTile tile = MakeTestNotificationSecondaryTile();

            tile.Templates = new Dictionary <string, NotificationTemplate>
            {
                {
                    "templateName",
                    null
                }
            };

            NotificationInstallationsControllerMock mock = new NotificationInstallationsControllerMock();

            try
            {
                mock.ValidateSecondaryTile(tile);
            }
            catch
            {
                testPass = true;
            }

            Assert.True(testPass);
        }
Exemplo n.º 2
0
        public void ValidateSecondaryTile_ThrowsOnNull()
        {
            bool testPass = false;
            NotificationInstallationsControllerMock mock = new NotificationInstallationsControllerMock();

            try
            {
                mock.ValidateSecondaryTile(null);
            }
            catch
            {
                testPass = true;
            }

            Assert.True(testPass);
        }
Exemplo n.º 3
0
        public void ValidateSecondaryTile_ThrowsOnNullTemplates()
        {
            bool testPass = false;
            NotificationSecondaryTile tile = MakeTestNotificationSecondaryTile();

            tile.Templates = null;
            NotificationInstallationsControllerMock mock = new NotificationInstallationsControllerMock();

            try
            {
                mock.ValidateSecondaryTile(tile);
            }
            catch
            {
                testPass = true;
            }

            Assert.True(testPass);
        }
Exemplo n.º 4
0
        public void ValidateSecondaryTile_ThrowsOnEmptyPushChannel()
        {
            string pushChannel             = string.Empty;
            bool   testPass                = false;
            NotificationSecondaryTile tile = MakeTestNotificationSecondaryTile();

            tile.PushChannel = pushChannel;
            NotificationInstallationsControllerMock mock = new NotificationInstallationsControllerMock();

            try
            {
                mock.ValidateSecondaryTile(tile);
            }
            catch
            {
                testPass = true;
            }

            Assert.True(testPass);
        }
        public void ValidateSecondaryTile_ThrowsOnNull()
        {
            bool testPass = false;
            NotificationInstallationsControllerMock mock = new NotificationInstallationsControllerMock();
            try
            {
                mock.ValidateSecondaryTile(null);
            }
            catch
            {
                testPass = true;
            }

            Assert.True(testPass);
        }
        public void ValidateSecondaryTile_ThrowsOnNullTemplateValue()
        {
            bool testPass = false;
            NotificationSecondaryTile tile = MakeTestNotificationSecondaryTile();

            tile.Templates = new Dictionary<string, NotificationTemplate>
            {
                { 
                    "templateName",
                    null
                }
            };

            NotificationInstallationsControllerMock mock = new NotificationInstallationsControllerMock();
            try
            {
                mock.ValidateSecondaryTile(tile);
            }
            catch
            {
                testPass = true;
            }

            Assert.True(testPass);
        }
        public void ValidateSecondaryTile_ThrowsOnNullTemplates()
        {
            bool testPass = false;
            NotificationSecondaryTile tile = MakeTestNotificationSecondaryTile();
            tile.Templates = null;
            NotificationInstallationsControllerMock mock = new NotificationInstallationsControllerMock();
            try
            {
                mock.ValidateSecondaryTile(tile);
            }
            catch
            {
                testPass = true;
            }

            Assert.True(testPass);
        }
        public void ValidateSecondaryTile_ThrowsOnEmptyPushChannel()
        {
            string pushChannel = string.Empty;
            bool testPass = false;
            NotificationSecondaryTile tile = MakeTestNotificationSecondaryTile();
            tile.PushChannel = pushChannel;
            NotificationInstallationsControllerMock mock = new NotificationInstallationsControllerMock();
            try
            {
                mock.ValidateSecondaryTile(tile);
            }
            catch
            {
                testPass = true;
            }

            Assert.True(testPass);
        }