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

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

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

            //Assert
            Assert.That(action, ThrowsException.NullArgument(ArgumentNames.NavigationKey));
        }
Ejemplo 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"));
        }
Ejemplo 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));
        }