示例#1
0
        /// <summary>
        /// Main entry point
        /// </summary>
        /// <param name="args">List of test methods to run</param>
        private static void Main(string[] args)
        {
            var testMethods = GetAllTestMethods();

            Console.WriteLine("List of test methods:");
            Console.WriteLine(string.Join(Environment.NewLine, testMethods.Select(m => m.Name)));

            var context = new DummyTestContext();

            RetriableRingMasterClientTest.TestClassInitialize(context);

            foreach (var methodName in args)
            {
                var method = testMethods.FirstOrDefault(m => string.Compare(m.Name, methodName, StringComparison.OrdinalIgnoreCase) == 0);
                if (method != null)
                {
                    var inst = Activator.CreateInstance(method.DeclaringType);
                    method.Invoke(inst, null);
                }
            }
        }
示例#2
0
        /// <summary>
        /// Main entry point
        /// </summary>
        /// <param name="args">List of test methods to run</param>
        private static void Main(string[] args)
        {
            var testMethods = GetAllTestMethods();

            Console.WriteLine("List of test methods:");
            Console.WriteLine(string.Join(Environment.NewLine, testMethods.Select(m => m.Name)));

            var context = new DummyTestContext();

            VegaInMemoryPerf.Setup(context);
            foreach (var methodName in args)
            {
                var method = testMethods.FirstOrDefault(m => string.Compare(m.Name, methodName, StringComparison.OrdinalIgnoreCase) == 0);
                if (method != null)
                {
                    var inst = Activator.CreateInstance(method.DeclaringType);
                    Console.WriteLine($"Start running test {method.Name}");
                    method.Invoke(inst, null);
                    Console.WriteLine($"Finished running test {method.Name}");
                }
            }
        }