public static RunTree FromType(Type t) { if (t==null) throw new ArgumentNullException("t"); if (!TypeHelper.HasCustomAttribute(t,typeof(TestFixturePatternAttribute))) throw new ArgumentException("type is not tagged by TestFixturePattern", "t"); TestFixturePatternAttribute pattern = (TestFixturePatternAttribute) TypeHelper.GetFirstCustomAttribute(t,typeof(TestFixturePatternAttribute)); RunTree runTree = new RunTree(pattern); return runTree; }
public static RunTree FromType(Type t) { if (t == null) { throw new ArgumentNullException("t"); } if (!TypeHelper.HasCustomAttribute(t, typeof(TestFixturePatternAttribute))) { throw new ArgumentException("type is not tagged by TestFixturePattern", "t"); } TestFixturePatternAttribute pattern = (TestFixturePatternAttribute) TypeHelper.GetFirstCustomAttribute(t, typeof(TestFixturePatternAttribute)); RunTree runTree = new RunTree(pattern); return(runTree); }