コード例 #1
0
        private static void Main()
        {
            Maximize();

            Console.WriteLine($"### Welcom to {nameof(ESATest)} program");
            Console.WriteLine($"### This program is used to test specific file processing");
            Console.WriteLine();

            // Process input to ushort
            var testOption = GetTestOption();

            // Process input to ushort
            var dataOption = GetDataOption();

            var iterations = GetIterations();

            Console.Clear();

            var start = DateTime.Now;

            Console.WriteLine();
            Console.WriteLine($"### Overall Start Time: {start.ToLongTimeString()}");
            Console.WriteLine($"### Number of iterations: {iterations}");
            Console.WriteLine();

            switch (testOption)
            {
            case 1:
            {
                var fileReadersTest = new FileReadersTest(iterations, dataOption);
                fileReadersTest.Start();
                fileReadersTest = null;
                GC.Collect();
                break;
            }

            case 2:
            {
                var collectionsTest = new CollectionsTest(iterations, dataOption);
                collectionsTest.Start();
                collectionsTest = null;
                GC.Collect();
                break;
            }

            default:
                Console.WriteLine("Cannot process this option");
                break;
            }

            var end = DateTime.Now;

            Console.WriteLine();
            Console.WriteLine($"### Overall End Time: {end.ToLongTimeString()}");
            Console.WriteLine($"### Overall Run Time: {(end - start)}");
            Console.WriteLine();
            Console.WriteLine("Press Enter to Exit");
            Console.ReadLine();
        }
コード例 #2
0
        public static void Main(string[] args)
        {
            Console.WriteLine("Starting tests..");

            AdapterTest adapterTest = new AdapterTest(  );

            adapterTest.TestMethod1(  );

            CollectionRebindTest collectionRebindTest = new CollectionRebindTest(  );

            collectionRebindTest.TestListRebind(  );

            CollectionsTest collectionsTest = new CollectionsTest(  );

            collectionsTest.TestListBinding(  );
            collectionsTest.TestListBinding2(  );

//            ExplicitConverterTest explicitConverterTest = new ExplicitConverterTest(  );
//            explicitConverterTest.TestMethod1(  );

            SimplePropertiesTest simplePropertiesTest = new SimplePropertiesTest(  );

            simplePropertiesTest.TestConversion(  );
            simplePropertiesTest.TestString(  );
            simplePropertiesTest.TestValidation(  );

            ValidationTest validationTest = new ValidationTest(  );

            validationTest.TestMethod1(  );

            Console.WriteLine("Tests completed successfully.");

            Console.WriteLine("Starting XAML tests..");
            XamlTest xamlTest = new XamlTest(  );

            xamlTest.TestXamlObject1(  );
            Console.WriteLine("XAML tests completed successfully.");
        }
コード例 #3
0
ファイル: UnitTest1.cs プロジェクト: Cristi34/TestingCSharp
 public void TestMethod1()
 {
     CollectionsTest.DictionaryTest();
 }