예제 #1
0
            public void ThrowsArgumentNullExceptionForNullTypeToResolve()
            {
                var viewLocator = new ViewLocator();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => viewLocator.Register(null, typeof(FollowingNoNamingConventionView)));
            }
예제 #2
0
            public void ShouldFailsDueToANonIViewModelType()
            {
                var viewModelManager = new ViewModelManager();

                ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => viewModelManager.GetFirstOrDefaultInstance(typeof(Type)));
            }
예제 #3
0
 public void ThrowsArgumentNullExceptionForNullInstance()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => new PropertyChangeUndo(null, "PropertyName", null));
 }
예제 #4
0
 public void ThrowsArgumentNullExceptionForNullViewModel()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => ViewModelCommandManager.Create(null));
 }
 public void ThrowsNotSupportedExceptionForNoMemberAccessExpression()
 {
     ExceptionTester.CallMethodAndExpectException <NotSupportedException>(() => PropertyHelper.GetPropertyName(() => SomeMethod()));
 }
예제 #6
0
 public void RemoveListener_Null()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => LogManager.RemoveListener(null));
 }
예제 #7
0
 public void ThrowsArgumentNullExceptionForNullPropertyChangedArguments()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => PropertyChangedEventArgsExtensions.HasPropertyChanged(null, () => TestProperty));
 }
예제 #8
0
            public void ThrowsArgumentNullExceptionForNullFunction()
            {
                var cache = new CacheStorage <string, int>();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => cache.GetFromCacheOrFetch("1", null));
            }
예제 #9
0
            public void ThrowsArgumentNullExceptionForNullValueIfNotAllowNullValues()
            {
                var cache = new CacheStorage <string, object>();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => cache.Add(null, null));
            }
예제 #10
0
            public void ThrowsArgumentNullExceptionForNullInstance()
            {
                var service = new MementoService();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => service.UnregisterObject(null));
            }
 public void ThrowsArgumentNullExceptionForNullInstance()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => MessageMediatorHelper.UnsubscribeRecipient(null));
 }
예제 #12
0
 public void ThrowsArgumentOutOfRangeExceptionForNegativeParameter()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentOutOfRangeException>(() => new MementoService(-1));
 }
예제 #13
0
 public void ThrowsArgumentNullExceptionForNullAndEmptyTypeRequestInfos()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => new TypeRequestPath((TypeRequestInfo)null));
     ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => new TypeRequestPath((TypeRequestInfo[])null));
     ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => new TypeRequestPath(new TypeRequestInfo[] { }));
 }
예제 #14
0
            public void ThrowsArgumentNullExceptionForNullResolvedType()
            {
                var viewLocator = new ViewLocator();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => viewLocator.Register(typeof(NoNamingConventionViewModel), null));
            }
예제 #15
0
            public void ThrowsArgumentNullExceptionForNullParameterInGeneric()
            {
                var exceptionService = new ExceptionService();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => exceptionService.Process <int>(null));
            }
예제 #16
0
            public void ThrowsArgumentNullExceptionForNullKey()
            {
                var cache = new CacheStorage <string, int>();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => cache.Remove(null));
            }
예제 #17
0
 public void IsListenerRegistered_Null()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => LogManager.IsListenerRegistered(null));
 }
예제 #18
0
            public void ThrowsArgumentNullExceptionForNullTypeToResolve()
            {
                var urlLocator = new UrlLocator();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => urlLocator.Register(null, "/Views/PersonView.xaml"));
            }
예제 #19
0
 public void GetLogger_Null()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => LogManager.GetLogger(null));
 }
예제 #20
0
            public void ThrowsArgumentNullExceptionForNullViewType()
            {
                var urlLocator = new UrlLocator();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => urlLocator.ResolveUrl(null));
            }
예제 #21
0
            public void ThrowsArgumentNullExceptionForNullPropertyExpressionArguments()
            {
                var propertyChangedEventArgs = new PropertyChangedEventArgs("TestProperty");

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => propertyChangedEventArgs.HasPropertyChanged((Expression <Func <string> >)null));
            }
예제 #22
0
 public void ThrowsArgumentNullExceptionForNullType()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => new TypeRequestInfo(null));
 }
 public void ThrowsArgumentNullExceptionForNullExpression()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => PropertyHelper.GetPropertyName <int>(null));
 }
 public void ThrowsArgumentExceptionIfTheListIsEmpty()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => FluentValidatorToCatelValidatorAdapter.From(new List <Type>()));
 }
예제 #25
0
            public void ThrowsArgumentNullExceptionForNullViewModel()
            {
                var vmManager = new ViewModelManager();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => vmManager.UnregisterAllModels(null));
            }
예제 #26
0
            public void ThrowsArgumentNullExceptionForNullParameter()
            {
                var exceptionService = new ExceptionService();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => exceptionService.HandleException(null));
            }
예제 #27
0
        public void UnregisterViewModelInstance_Null()
        {
            var manager = new ViewModelManager();

            ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => manager.UnregisterViewModelInstance(null));
        }
예제 #28
0
            public void ReturnsArgumentNullException()
            {
                var exceptionService = new ExceptionService();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => exceptionService.IsExceptionRegistered(null));
            }
예제 #29
0
 public void ThrowsArgumentNullExceptionForNullMessage()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentException>(() => new BusinessRuleValidationResult(ValidationResultType.Error, null));
 }
예제 #30
0
            public void ThrowsCircularDependencyExceptionIfThereAreRepetitions()
            {
                var typeArray = CreateInvalidPath();

                ExceptionTester.CallMethodAndExpectException <CircularDependencyException>(() => MapRequestInfoArrayIntoPath(typeArray));
            }