protected void ExecuteInvoker(Type expectedType, Exception ex, bool shouldThrow) { ThrowExceptionRunInvoker invoker = new ThrowExceptionRunInvoker(ex); ConditionalExceptionRunInvoker einvoker = new ConditionalExceptionRunInvoker(invoker, expectedType,"Description", "ShouldThrow"); ArrayList list = new ArrayList(); list.Add(shouldThrow); ThrowOracle oracle = new ThrowOracle(); einvoker.Execute(oracle, list); Assert.IsTrue(invoker.Invoked); }
protected ExpectedExceptionRunInvoker ExecuteInvoker(Type expectedType, Exception ex) { ThrowExceptionRunInvoker invoker = new ThrowExceptionRunInvoker(ex); ExpectedExceptionRunInvoker einvoker = new ExpectedExceptionRunInvoker(invoker, expectedType, description); ArrayList list = new ArrayList(); einvoker.Execute(null, list); Assert.IsTrue(invoker.Invoked); return(einvoker); }
protected void ExecuteInvoker(Type expectedType, Exception ex, bool shouldThrow) { ThrowExceptionRunInvoker invoker = new ThrowExceptionRunInvoker(ex); ConditionalExceptionRunInvoker einvoker = new ConditionalExceptionRunInvoker(invoker, expectedType, "Description", "ShouldThrow"); ArrayList list = new ArrayList(); list.Add(shouldThrow); ThrowOracle oracle = new ThrowOracle(); einvoker.Execute(oracle, list); Assert.IsTrue(invoker.Invoked); }
protected ExpectedExceptionRunInvoker ExecuteInvoker(Type expectedType, Exception ex) { ThrowExceptionRunInvoker invoker = new ThrowExceptionRunInvoker(ex); ExpectedExceptionRunInvoker einvoker = new ExpectedExceptionRunInvoker(invoker, expectedType,description); ArrayList list = new ArrayList(); einvoker.Execute(null, list); Assert.IsTrue(invoker.Invoked); return einvoker; }