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

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