Ejemplo n.º 1
0
        /// <summary>
        /// Run all methods in each of the listed assemblies
        /// </summary>
        public void Run(IORMToolServices services, IORMToolTestSuiteReport suiteReport)
        {
            suiteReport.BeginSuite(myName);
            IList <ReportAssembly> allAssemblies = myAssemblies;

            if (allAssemblies == null)
            {
                return;
            }
            int assemblyCount = allAssemblies.Count;

            for (int i = 0; i < assemblyCount; ++i)
            {
                ReportAssembly testAssembly     = allAssemblies[i];
                Assembly       resolvedAssembly = testAssembly.Assembly;
                suiteReport.BeginTestAssembly(testAssembly.Location, resolvedAssembly == null);
                if (resolvedAssembly != null)
                {
                    Type[] types     = resolvedAssembly.GetTypes();
                    int    typeCount = types.Length;
                    for (int j = 0; j < typeCount; ++j)
                    {
                        Type type = types[j];
                        if (0 != type.GetCustomAttributes(typeof(ORMTestFixtureAttribute), true).Length)
                        {
                            RunTests(type, services, suiteReport);
                        }
                    }
                }
            }
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Run all methods in each of the listed assemblies
		/// </summary>
		public void Run(IORMToolServices services, IORMToolTestSuiteReport suiteReport)
		{

			suiteReport.BeginSuite(myName);
			IList<ReportAssembly> allAssemblies = myAssemblies;
			if (allAssemblies == null)
			{
				return;
			}
			int assemblyCount = allAssemblies.Count;
			for (int i = 0; i < assemblyCount; ++i)
			{
				ReportAssembly testAssembly = allAssemblies[i];
				Assembly resolvedAssembly = testAssembly.Assembly;
				suiteReport.BeginTestAssembly(testAssembly.Location, resolvedAssembly == null);
				if (resolvedAssembly != null)
				{
					Type[] types = resolvedAssembly.GetTypes();
					int typeCount = types.Length;
					for (int j = 0; j < typeCount; ++j)
					{
						Type type = types[j];
						if (0 != type.GetCustomAttributes(typeof(ORMTestFixtureAttribute), true).Length)
						{
							RunTests(type, services, suiteReport);
						}
					}
				}
			}
			 
		}