void FindAssemblyCleanupMethod()
        {
            var methods =
                TestClasses
                .Select(c => c.AssemblyCleanupMethod)
                .Where(c => c != null)
                .ToList();

            if (methods.Count > 1)
            {
                throw new UserException(
                          $"[TestAssembly] {Assembly.FullName} contains more than one [AssemblyCleanup] method");
            }

            if (methods.Count == 0)
            {
                return;
            }

            AssemblyCleanupMethod = methods[0];
        }
Example #2
0
        void FindAssemblyCleanupMethod()
        {
            var methods =
                TestClasses
                .Select(c => c.AssemblyCleanupMethod)
                .Where(c => c != null)
                .ToList();

            if (methods.Count > 1)
            {
                throw new UserException(
                          StringExtensions.FormatInvariant(
                              "[TestAssembly] {0} contains more than one [AssemblyCleanup] method",
                              Assembly.FullName));
            }

            if (methods.Count == 0)
            {
                return;
            }

            AssemblyCleanupMethod = methods[0];
        }