Esempio n. 1
0
		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;
		}
Esempio n. 2
0
        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);
        }