Esempio n. 1
0
        public void DataStorageIsNull_ThrowException()
        {
            //Act
            TestDelegate action = () =>
            {
                _navigationManager = CreateNavigationManager(_frameControl, null);
            };

            //Assert
            Assert.That(action, ThrowsException.NullArgument(ArgumentNames.DataStorage));
        }
Esempio n. 2
0
        public void Navigate_KeyIsNull_ThrowException()
        {
            //Arrange

            //Act
            TestDelegate action = () =>
            {
                _navigationManager.Navigate(null);
            };

            //Assert
            Assert.That(action, ThrowsException.NullArgument(ArgumentNames.NavigationKey));
        }
Esempio n. 3
0
        public void Register_NavigationKeyIsNull_ThrowException()
        {
            //Arrange
            Func <object> viewModelFunc = () => new object();
            Func <object> viewFunc      = () => _view;

            //Act
            TestDelegate action = () =>
            {
                RegisterNavigationRule(_navigationManager, null, viewModelFunc, viewFunc);
            };

            //Assert
            Assert.That(action, ThrowsException.NullArgument("navigationKey"));
        }
Esempio n. 4
0
        public void Register_ViewFuncIsNull_ThrowException()
        {
            //Arrange
            var           navigationKey = "navigationKey";
            Func <object> viewModelFunc = () => new object();

            //Act
            TestDelegate action = () =>
            {
                RegisterNavigationRule(_navigationManager, navigationKey, viewModelFunc, null);
            };

            //Assert
            Assert.That(action, ThrowsException.NullArgument(ArgumentNames.GetView));
        }