예제 #1
0
 public void ThrowsInvalidOperationExceptionWhenEverythingIsStatic()
 {
     ExceptionTester.CallMethodAndExpectException <InvalidOperationException>(() => WeakEventListener <EventListener, EventSource, EventArgs> .SubscribeToWeakGenericEvent(null, null, "StaticEvent", EventListener.OnEventStaticHandler));
 }
예제 #2
0
            public void ThrowsArgumentNullExceptionForNullSource()
            {
                var listener = new EventListener();

                ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => listener.SubscribeToWeakGenericEvent <ViewModelClosedEventArgs>(null, "event", listener.OnPublicEvent));
            }
예제 #3
0
 public void ThrowsArgumentNullExceptionForNullUri()
 {
     ExceptionTester.CallMethodAndExpectException <ArgumentNullException>(() => UriExtensions.GetSafeUriString(null));
 }