Exemplo n.º 1
0
        public void Get_KeyIsNull_ThrowException()
        {
            //Act
            TestDelegate action = () =>
            {
                _dataStorage.Get(null);
            };

            //Assert
            Assert.That(action, ThrowsException.NullArgument(ArgumentNames.Key));
        }
Exemplo n.º 2
0
        public void Add_KeyIsNull_ThrowException()
        {
            //Act
            TestDelegate action = () =>
            {
                _dataStorage.Add(null, _navigationData);
            };

            //Assert
            Assert.That(action, ThrowsException.NullArgument(ArgumentNames.Key));
        }
        public void SetContent_ControlIsNull_ThrowException()
        {
            //Act
            void Action()
            {
                _viewInteractionStrategy.SetContent(null, new object());
            }

            //Assert
            Assert.That(Action, ThrowsException.NullArgument(ArgumentNames.Control));
        }
Exemplo n.º 4
0
        public void RegisterNavigationManager_FrameControlTypeIsNull_ThrowException()
        {
            //Act
            void Action()
            {
                _unityContainer.RegisterNavigationManager(_frameControl, _navigationManagerType, null, _injectionMembers);
            }

            //Assert
            Assert.That(Action, ThrowsException.NullArgument(ArgumentNames.FrameControlType));
        }
        public void GetDataContext_ControlIsNull_ThrowException()
        {
            //Act
            void Action()
            {
                _viewInteractionStrategy.GetDataContext(null);
            }

            //Assert
            Assert.That(Action, ThrowsException.NullArgument(ArgumentNames.Control));
        }
        public void UnityContainerIsNull_ThrowException()
        {
            //Act
            TestDelegate action = () =>
            {
                new UnityDataStorage(null);
            };

            //Assert
            Assert.That(action, ThrowsException.NullArgument(ArgumentNames.UnityContainer));
        }
Exemplo n.º 7
0
        public void Add_NavigationDataIsNull_ThrowException()
        {
            //Arrange
            const string key = "key";

            //Act
            TestDelegate action = () =>
            {
                _dataStorage.Add(key, null);
            };

            //Assert
            Assert.That(action, ThrowsException.NullArgument(ArgumentNames.NavigationData));
        }
Exemplo n.º 8
0
        public void RegisterNavigationRule_NavigationKeyIsNull_ThrowException()
        {
            //Assert
            _navigationKey = null;

            //Act
            void Action()
            {
                _unityContainer.RegisterNavigationRule <object, object>(_navigationKey);
            }

            //Assert
            Assert.That(Action, ThrowsException.NullArgument(ArgumentNames.NavigationKey));
        }
Exemplo n.º 9
0
        public void RegisterNavigationRule_UnityContainerIsNull_ThrowException()
        {
            //Arrange
            _unityContainer = null;

            //Act
            void Action()
            {
                _unityContainer.RegisterNavigationRule <InstanceClass, object>(_navigationKey);
            }

            //Assert
            Assert.That(Action, ThrowsException.NullArgument(ArgumentNames.UnityContainer));
        }
Exemplo n.º 10
0
        public void RegisterNavigationManager_FrameControlTypeProviderIsNull_ThrowException()
        {
            //Arrange
            var navigationManagerTypeProvider = Mock.Of <INavigationManagerTypeProvider>();

            //Act
            void Action()
            {
                _unityContainer.RegisterNavigationManager(_frameControl, navigationManagerTypeProvider, null);
            }

            //Assert
            Assert.That(Action, ThrowsException.NullArgument(ArgumentNames.FrameControlTypeProvider));
        }