public DenyEnvironmentRunInvoker( IRunInvoker invoker, DenyEnvironmentAttribute attribute) : base(invoker) { this.attribute = attribute; }
public DenyDnsRunInvoker( IRunInvoker invoker, DenyDnsAttribute attribute) : base(invoker) { this.attribute = attribute; }
public DBDataRunInvoker( IRunInvoker invoker, DenyDBDataAttribute attribute) : base(invoker) { this.attribute = attribute; }
public DenyFileDialogAccessRunInvoker( IRunInvoker invoker, DenyFileDialogAttribute attribute) : base(invoker) { this.attribute = attribute; }
public DenyWindowRunInvoker( IRunInvoker invoker, DenyUIAttribute attribute) : base(invoker) { this.attribute = attribute; }
public ExecuteException( IRunInvoker invoker, Object tested, IList args ) :base(invoker,tested,args) {}
/// <summary> /// Initializes a new instance of the <see cref="PerfCounterRunInvoker"/> class. /// </summary> /// <param name="invoker">The test invoker.</param> /// <param name="attribute">The <see cref="PerfCounterAttribute"/> tagging the test method.</param> public PerfCounterRunInvoker(IRunInvoker invoker, PerfCounterAttribute attribute) : base(invoker) { this.attribute = attribute; this.counter = new PerformanceCounter(); this.counter.CategoryName = attribute.CategoryName; this.counter.CounterName = attribute.CounterName; Process currentProcesss = Process.GetCurrentProcess(); if (attribute.InstanceName != null) { this.counter.InstanceName = attribute.InstanceName; } else { this.counter.InstanceName = currentProcesss.ProcessName; } if (attribute.MachineName != null) { this.counter.MachineName = attribute.MachineName; } else { this.counter.MachineName = currentProcesss.MachineName; } }
public DenyFileIORunInvoker( IRunInvoker invoker, DenyFileIOAttribute attribute) : base(invoker) { this.attribute = attribute; }
public DenyPrintingRunInvoker( IRunInvoker invoker, DenyPrintingAttribute attribute) : base(invoker) { this.attribute = attribute; }
public override IRunInvoker GetInvoker(IRunInvoker wrapped) { ChangeCultureRunInvoker invoker = new ChangeCultureRunInvoker(this.name, wrapped); return(invoker); }
public DenyReflectionRunInvoker( IRunInvoker invoker, DenyReflectionAttribute attribute) : base(invoker) { this.attribute = attribute; }
public RunInvokerVertex AddChild(RunInvokerVertex parent, IRunInvoker child) { if (parent == null) { throw new ArgumentNullException("parent"); } if (child == null) { throw new ArgumentNullException("child"); } // create vertex RunInvokerVertex v = (RunInvokerVertex)this.graph.AddVertex(); // decorate with fixture decorators if needed IRunInvoker invoker = child; //if (invoker.Generator.IsTest) invoker = this.DecorateInvokerWithFixtureDecorators(invoker); v.Invoker = invoker; // add edge this.graph.AddEdge(parent, v); return(v); }
public ThreadedRepeatRunInvoker(IRunInvoker invoker, int count) :base(invoker) { if (count<1) throw new ArgumentException("count must be greate or equal than 1"); this.count = count; }
protected ExecuteException( IRunInvoker invoker, Object tested, IList args, SerializationInfo info, StreamingContext context) :base(invoker,tested,args,info,context) {}
/// <summary> /// Adds an instance of type IRunInvoker to the end of this IRunInvokerCollection. /// </summary> /// <param name="value"> /// The IRunInvoker to be added to the end of this IRunInvokerCollection. /// </param> public void Add(IRunInvoker value) { if (value == null) { throw new ArgumentNullException("value"); } this.List.Add(value); }
public override IRunInvoker GetInvoker(IRunInvoker invoker) { return new ConditionalExceptionRunInvoker( invoker, this.ExceptionType, this.Description, this.predicateMethodName); }
public MultipleCultureRunInvoker(IRunInvoker invoker, MultipleCultureAttribute attribute) : base(invoker) { if (attribute==null) throw new ArgumentNullException("attribute"); this.attribute = attribute; }
protected ExecuteException( IRunInvoker invoker, Object tested, IList args, SerializationInfo info, StreamingContext context) : base(invoker, tested, args, info, context) { }
public ExecuteException( IRunInvoker invoker, Object tested, IList args ) : base(invoker, tested, args) { }
public DenyIsolatedRunInvoker( IRunInvoker invoker, DenyIsolatedFileStorageAttribute attribute) : base(invoker) { this.attribute = attribute; this.PermitOnly = true; }
public PushEnvironmentVariableRunInvoker( IRunInvoker invoker, PushEnvironmentVariableAttribute attribute ) : base(invoker) { this.attribute = attribute; }
public override void Reflect(RunInvokerTree tree, RunInvokerVertex parent, Type t) { foreach (MethodInfo mi in TypeHelper.GetAttributedMethods(t, this.framework.TestAttributeType)) { IRunInvoker invoker = this.CreateInvoker(mi); tree.AddChild(parent, invoker); } }
public DenyAspNetHostingRunInvoker( IRunInvoker invoker, DenyAspNetHostingAttribute attribute) : base(invoker) { this.attribute = attribute; this.PermitOnly = true; }
/// <summary> /// Default constructor - initializes all fields to default values /// </summary> public InvokerEventArgs(IRunInvoker invoker) { if (invoker == null) { throw new ArgumentNullException("invoker"); } this.invoker = invoker; }
/// <summary> /// Returns a <see cref="ConditionalExceptionRunInvoker"/> object to invoke the test if the predicate is true /// </summary> /// <param name="invoker">The standard test invoker derived from <see cref="IRunInvoker"/></param> /// <returns>A <see cref="ConditionalExceptionRunInvoker"/> object to invoke the test if the predicate is true</returns> public override IRunInvoker GetInvoker(IRunInvoker invoker) { return(new ConditionalExceptionRunInvoker( invoker, this.ExceptionType, this.Description, this.predicateMethodName)); }
public ExecuteException( IRunInvoker invoker, Object tested, IList args, string message ) :base(invoker,tested,args,message) {}
protected DecoratorRunInvoker(IRunInvoker invoker, string description) { if (invoker == null) throw new ArgumentNullException("invoker"); this.invoker = invoker; this.description = description; }
public RepeatRunInvoker(IRunInvoker invoker, int count) : base(invoker) { if (count < 1) { throw new ArgumentException("count must be greate or equal than 1"); } this.count = count; }
protected IRunInvoker InstanceInvoker(MethodInfo mi) { Object[] args = new Object[2]; args[0] = this; args[1] = mi; IRunInvoker invoker = (IRunInvoker)this.invokerConstructor.Invoke(args); return(DecoratorPatternAttribute.DecoreInvoker(mi, invoker)); }
public ExecuteException( IRunInvoker invoker, Object tested, IList args, string message ) : base(invoker, tested, args, message) { }
public ExpectedExceptionRunInvoker(IRunInvoker invoker, Type exceptionType, string expectedMessage, Type innerExceptionType, string description) : base(invoker, description) { if (exceptionType == null) throw new ArgumentNullException("exceptionType"); this.exceptionType = exceptionType; this.expectedMessage = expectedMessage; this.innerExceptionType = innerExceptionType; }
public static IRunInvoker DecoreInvoker(MethodInfo mi, IRunInvoker invoker) { // looking for decoring attributes foreach (DecoratorPatternAttribute deco in mi.GetCustomAttributes(typeof(DecoratorPatternAttribute), true)) { invoker = deco.GetInvoker(invoker); } return(invoker); }
protected DecoratorRunInvoker(IRunInvoker invoker, string description) { if (invoker == null) { throw new ArgumentNullException("invoker"); } this.invoker = invoker; this.description = description; }
public InvokerException( IRunInvoker invoker, Object tested, IList args ) { this.invoker = invoker; this.tested = tested; this.args = args; }
public DurationRunInvoker( IRunInvoker invoker, DurationAttribute attribute ) :base(invoker) { if (attribute==null) throw new ArgumentNullException("attribute"); this.attribute = attribute; }
public static IRunInvoker DecoreInvoker(MethodInfo mi, IRunInvoker invoker) { // looking for decoring attributes foreach(DecoratorPatternAttribute deco in mi.GetCustomAttributes(typeof(DecoratorPatternAttribute),true)) { invoker = deco.GetInvoker(invoker); } return invoker; }
/// <summary> /// Constructs a execute functor /// </summary> /// <param name="invoker">invoker to execute</param> /// <param name="o"><see cref="IRunInvoker"/>.Execute arguments</param> /// <param name="args"><see cref="IRunInvoker"/>.Execute arguments</param> public ThreadedRunInvokerStarter( IRunInvoker invoker, Object o, IList args ) { this.invoker = invoker; this.o = o; this.args = args; }
public MultipleCultureRunInvoker(IRunInvoker invoker, MultipleCultureAttribute attribute) : base(invoker) { if (attribute == null) { throw new ArgumentNullException("attribute"); } this.attribute = attribute; }
protected InvokerException( IRunInvoker invoker, Object tested, IList args, SerializationInfo info, StreamingContext context) : base(info, context) { this.invoker = invoker; this.tested = tested; this.args = args; }
protected InvokerException( IRunInvoker invoker, Object tested, IList args, SerializationInfo info, StreamingContext context) :base(info,context) { this.invoker = invoker; this.tested = tested; this.args = args; }
public ExpectedExceptionRunInvoker(IRunInvoker invoker, Type exceptionType, string expectedMessage, Type innerExceptionType, string description) : base(invoker, description) { if (exceptionType == null) { throw new ArgumentNullException("exceptionType"); } this.exceptionType = exceptionType; this.expectedMessage = expectedMessage; this.innerExceptionType = innerExceptionType; }
public ConditionalExceptionRunInvoker( IRunInvoker invoker, Type exceptionType, string description, string predicateMethodName ) :base(invoker,exceptionType,description) { if (predicateMethodName==null) throw new ArgumentNullException("predicateMethodName"); this.predicateMethodName = predicateMethodName; }
public InvokerException( IRunInvoker invoker, Object tested, IList args, string message ) :base(message) { this.invoker = invoker; this.tested = tested; this.args = args; }
public DurationRunInvoker( IRunInvoker invoker, DurationAttribute attribute ) : base(invoker) { if (attribute == null) { throw new ArgumentNullException("attribute"); } this.attribute = attribute; }
protected MethodDurationException( double minDuration, double maxDuration, double actualDuration, IRunInvoker invoker, Object tested, IList args, SerializationInfo info, StreamingContext context) :base(invoker,tested,args,info,context) { this.minDuration = minDuration; this.maxDuration = maxDuration; this.actualDuration = actualDuration; }
public MethodDurationException( double minDuration, double maxDuration, double actualDuration, IRunInvoker invoker, Object tested, IList args ) : base(invoker,tested,args) { this.minDuration = minDuration; this.maxDuration = maxDuration; this.actualDuration = actualDuration; }
/// <summary> /// Initializes a new <see cref="TestCase"/> instance /// with name and delegate. /// </summary> /// <param name="name"> /// Name of the test case /// </param> /// <param name="testDelegate"> /// Delegate called by the test case /// </param> /// <param name="parameters"> /// Parameters of the delegate /// </param> /// <exception cref="ArgumentNullException"> /// <paramref name="name"/> or <paramref name="testDelegate"/> /// is a null reference (Nothing in Visual Basic) /// </exception> /// <exception cref="ArgumentException"> /// <paramref name="name"/> is empty. /// </exception> public TestCase(string name, Delegate testDelegate, params Object[] parameters) { if (name == null) throw new ArgumentNullException("name"); if (name.Length == 0) throw new ArgumentException("name is empty"); if (testDelegate == null) throw new ArgumentNullException("testDelegate"); this.name = name; this.testDelegate = testDelegate; this.parameters = parameters; DelegateRunInvoker delegateInvoker = new DelegateRunInvoker(new TestCaseRun(), testDelegate, parameters); this.invoker = DecoratorPatternAttribute.DecoreInvoker(testDelegate.Method, delegateInvoker); }
public MethodDurationException( double minDuration, double maxDuration, double actualDuration, IRunInvoker invoker, Object tested, IList args, string message, Exception innerException ) : base(invoker,tested,args,message,innerException) { this.minDuration = minDuration; this.maxDuration = maxDuration; this.actualDuration = actualDuration; }
/// <summary> /// Returns the invoker class to run the test with the given duration parameters. /// </summary> /// <param name="invoker">The invoker currently set to run the test.</param> /// <returns>A new <see cref="MultipleCultureRunInvoker"/> object wrapping <paramref name="invoker"/></returns> public override IRunInvoker GetInvoker(IRunInvoker invoker) { return new MultipleCultureRunInvoker(invoker, this); }
public ChangeCultureRunInvoker(string cultureName, IRunInvoker invoker) : base(invoker) { this.cultureName = cultureName; }