AWSSDK.Tests.Framework.UnityTestAssemblyBuilder.BuildTestAssembly C# (CSharp) Method

BuildTestAssembly() private method

private BuildTestAssembly ( Assembly assembly, string assemblyName, IList fixtures ) : TestSuite
assembly System.Reflection.Assembly
assemblyName string
fixtures IList
return NUnit.Framework.Internal.TestSuite
        private TestSuite BuildTestAssembly(Assembly assembly, string assemblyName, IList<Test> fixtures)
        {
            TestSuite testAssembly = new TestAssembly(assembly, assemblyName);
            if (fixtures.Count == 0)
            {
                testAssembly.RunState = RunState.NotRunnable;
                testAssembly.Properties.Set(PropertyNames.SkipReason, "Has no TestFixtures");
            }
            else
            {
                NamespaceTreeBuilder treeBuilder =
                    new NamespaceTreeBuilder(testAssembly);
                treeBuilder.Add(fixtures);
                testAssembly = treeBuilder.RootSuite;
            }

            testAssembly.ApplyAttributesToTest(assembly);

            testAssembly.Properties.Set(PropertyNames.ProcessID, System.Diagnostics.Process.GetCurrentProcess().Id);
            testAssembly.Properties.Set(PropertyNames.AppDomain, AppDomain.CurrentDomain.FriendlyName);

            // TODO: Make this an option? Add Option to sort assemblies as well?
            testAssembly.Sort();
            return testAssembly;
        }