コード例 #1
0
        public void ApplyParameters_CalledOnNonNull_WithNonNullInvalidParams_ThrowsCorrectException(
            List <NavigationParameterModel> parameters)
        {
            IViewModelBase viewModel = new ViewModelStub();

            Assert.ThrowsAny <Exception>(() => viewModel.ApplyParameters(parameters));
        }
コード例 #2
0
        public void ApplyParameters_CalledOnNonNull_WithNonNullValidParams_SetsCorrectProperties()
        {
            var viewModel  = new ViewModelStub();
            var parameters = FluentNavigatorExtensionsTestsDataProvider.ValidNavigationParams;

            viewModel.ApplyParameters(parameters);

            Assert.Equal(FluentNavigatorExtensionsTestsDataProvider.PropertyValue1, viewModel.StringParameter);
            Assert.Equal(FluentNavigatorExtensionsTestsDataProvider.PropertyValue2, viewModel.IntParameter);
        }
コード例 #3
0
        public void ApplyParameters_CalledOnNonNull_WithNullParams_ThrowsCorrectException()
        {
            IViewModelBase viewModel = new ViewModelStub();

            Assert.Throws <ArgumentNullException>(() => viewModel.ApplyParameters(null));
        }