public static void TestDebuggerAttributes_Null() { Type proxyType = DebuggerAttributes.GetProxyType(ImmutableSortedSet.CreateBuilder <int>()); TargetInvocationException tie = Assert.Throws <TargetInvocationException>(() => Activator.CreateInstance(proxyType, (object)null)); Assert.IsType <ArgumentNullException>(tie.InnerException); }
public static void TestDebuggerAttributes_Null() { Type proxyType = DebuggerAttributes.GetProxyType(ImmutableStack.Create <string>("1", "2", "3")); TargetInvocationException tie = Assert.Throws <TargetInvocationException>(() => Activator.CreateInstance(proxyType, (object)null)); Assert.IsType <ArgumentNullException>(tie.InnerException); }
public static void TestDebuggerAttributes_Null() { Type proxyType = DebuggerAttributes.GetProxyType(new ConcurrentDictionary <string, int>()); TargetInvocationException tie = Assert.Throws <TargetInvocationException>(() => Activator.CreateInstance(proxyType, (object)null)); Assert.IsType <ArgumentNullException>(tie.InnerException); }
public void DebuggerTypeProxy_Ctor_NullArgument_Throws() { IProducerConsumerCollection <int> c = CreateProducerConsumerCollection(); Type proxyType = DebuggerAttributes.GetProxyType(c); var tie = Assert.Throws <TargetInvocationException>(() => Activator.CreateInstance(proxyType, new object[] { null })); Assert.IsType <ArgumentNullException>(tie.InnerException); }
public static void TestDebuggerAttributes_Null(object obj) { Type proxyType = DebuggerAttributes.GetProxyType(obj); Assert.Throws <TargetInvocationException>(() => Activator.CreateInstance(proxyType, (object)null)); }