예제 #1
0
        public void Get_KeyIsNull_ThrowException()
        {
            //Act
            TestDelegate action = () =>
            {
                _dataStorage.Get(null);
            };

            //Assert
            Assert.That(action, ThrowsException.NullArgument(ArgumentNames.Key));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }
예제 #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));
        }