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

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