public TestMethodInstance(TestMethodBaseAttribute attr, Dictionary <string, object> metadata, object[] parameters, object classInstance, MethodInfo method, RunnerException ex) { Attr = attr; _metadata = metadata; _parameters = parameters; _classInstance = classInstance; _method = method; _ex = ex; }
protected MethodExploderBase(MethodInfo method) { Method = method; var attrs = Method.GetCustomAttributes(typeof(TestMethodBaseAttribute), true); if (attrs.Length == 1) { Attribute = (TestMethodBaseAttribute)attrs[0]; } }
public BeforesuiteWebTestMethodExploder(MethodInfo method, Configuration config) { _method = method; var attrs = _method.GetCustomAttributes(typeof(TestMethodBaseAttribute), true); if (attrs.Length == 1) { _attribute = (TestMethodBaseAttribute)attrs[0]; } _multiplier = new BeforesuiteWebTestMethodMultiplier(config); }
private List <Object[]> GetParamsFromDataProvider(Object classInstance, MethodInfo method, TestMethodBaseAttribute attr) { // find the method. var name = attr.DataProvider; if (name == null) { throw new DataProviderException("expected a data provider for " + method); } var provider = classInstance.GetType().GetMethod(name); if (provider == null) { throw new DataProviderException("No dataprovider method with name " + name); } return((List <object[]>)provider.Invoke(classInstance, null)); }
public TestMethodInstance(TestMethodBaseAttribute attr, Dictionary <string, object> metadata, object[] parameters, object classInstance, MethodInfo method) : this(attr, metadata, parameters, classInstance, method, null) { }