Exemplo n.º 1
0
 public static List<CaseInfo> GetCasesInfo(SelectInfo sInfo)
 {
     List<CaseInfo> cases = new List<CaseInfo>();
     switch (sInfo.CaseCategory)
     {
         case "Constructor":
             AddDesForConstructorCases(sInfo, cases);
             break;
         case "DataFilling(Unbound)":
             AddDesForDataFillingUnboundCases(sInfo, cases);
             break;
         case "DataFilling(Binding)":
             AddDesForDataFillingBindingCases(sInfo, cases);
             break;
         case "Load":
             AddDesForLoadCases(sInfo, cases);
             break;
         case "Selection":
             AddDesForSelectionCases(sInfo, cases);
             break;
         case "Scrolling":
             AddDesForScrollingCases(sInfo, cases);
             break;
         default:
             break;
     }
     return cases;
 }
Exemplo n.º 2
0
 private static void AddDesForConstructorCases(SelectInfo sInfo, List<CaseInfo> cases)
 {
     List<String> des1 = new List<string>();
     des1.Add("Constructor a GcWorkbook.");
     des1.Add("SX is so fast!");
     cases.Add(new CaseInfo()
     {
         CaseName = "GcWorkbook_PTest_Constructor_Test_01",
         ControlName = sInfo.ControlName,
         CaseDes = des1
     });
 }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            // Utility.GetRecordCount();

            // Dictionary<String, List<List<PerformanceValue>>> ss = TempData.GetPValueOfOneCaseOneWatcher();

            SelectInfo sInfo = new SelectInfo();
            sInfo.AssemblyType = "";
            sInfo.Days = 10;

            DataService dService = new DataService(sInfo);

            Dictionary<CaseInfo, Dictionary<ChartInfo, Dictionary<String, List<PerformanceValue>>>> cData = dService.GetAllDatas();

            Console.ReadKey();
        }
Exemplo n.º 4
0
        private static void AddDesForDataFillingBindingCases(SelectInfo sInfo, List<CaseInfo> cases)
        {
            List<String> des5 = new List<string>();
            des5.Add("Filling data to a GcWorkbook(100 columns, 1000 rows). By binding.");
            cases.Add(new CaseInfo()
            {
                CaseName = "GcWorkbook_PTest_DataFilling_Test_06",
                ControlName = sInfo.ControlName,
                CaseDes = des5
            });

            List<String> des6 = new List<string>();
            des6.Add("Filling data to a GcWorkbook(100 columns, 1000 rows), not in form. By binding.");
            cases.Add(new CaseInfo()
            {
                CaseName = "GcWorkbook_PTest_DataFilling_Test_07",
                ControlName = sInfo.ControlName,
                CaseDes = des6
            });

            List<String> des7 = new List<string>();
            des7.Add("Filling data to a GcWorkbook(20 columns, 100000 rows). By binding.");
            cases.Add(new CaseInfo()
            {
                CaseName = "GcWorkbook_PTest_DataFilling_Test_08",
                ControlName = sInfo.ControlName,
                CaseDes = des7
            });

            List<String> des8 = new List<string>();
            des8.Add("Filling data to a GcWorkbook(20 columns, 100000 rows), not in form. By binding.");
            cases.Add(new CaseInfo()
            {
                CaseName = "GcWorkbook_PTest_DataFilling_Test_09",
                ControlName = sInfo.ControlName,
                CaseDes = des8
            });
        }
Exemplo n.º 5
0
        public DataService(SelectInfo selectInfo)
        {
            _selectInfo = new SelectInfoInternal();

            // just for test
            _selectInfo.Days = selectInfo.Days;
            _selectInfo.AssemblyType = selectInfo.AssemblyType;
            _selectInfo.ControlName = selectInfo.ControlName;
            _selectInfo.CaseCategory = selectInfo.CaseCategory;

            // set last day
            List<DateTime> runTimes = Utility.RunTimes(0, _selectInfo.Days, _selectInfo.AssemblyType);
            _selectInfo.LastTime = runTimes[0];
        }
Exemplo n.º 6
0
 public Dictionary<CaseInfo, Dictionary<ChartInfo, Dictionary<String, List<PerformanceValue>>>> GetChartData(SelectInfo selectInfo)
 {
     DataService ds = new DataService(selectInfo);
     return ds.GetAllDatas();
 }
Exemplo n.º 7
0
 private static void AddDesForSelectionCases(SelectInfo sInfo, List<CaseInfo> cases)
 {
     List<string> des1 = new List<string>();
     List<string> des3 = new List<string>();
     List<string> des5 = new List<string>();
     List<string> des7 = new List<string>();
     if (sInfo.AssemblyType == "SILVERLIGHT")
     {
         des1.Add("GcWorkbook select region(100 columns, 1000 rows), show part of cells. Please subtract 0.23s for Time watcher.");
         des3.Add("GcWorkbook select region(20 columns, 100000 rows), show part of cells. Please subtract 0.23s for Time watcher.");
         des5.Add("GcWorkbook select region(100 columns, 1000 rows), full screen. Please subtract 0.23s for Time watcher.");
         des7.Add("GcWorkbook select region(20 columns, 100000 rows), full screen. Please subtract 0.23s for Time watcher.");
     }
     else
     {
         des1.Add("GcWorkbook select region(100 columns, 1000 rows), show part of cells.");
         des3.Add("GcWorkbook select region(20 columns, 100000 rows), show part of cells.");
         des5.Add("GcWorkbook select region(100 columns, 1000 rows), full screen.");
         des7.Add("GcWorkbook select region(20 columns, 100000 rows), full screen.");
     }
     cases.Add(new CaseInfo()
     {
         CaseName = "GcWorkbook_Selection_Test_01",
         ControlName = sInfo.ControlName,
         CaseDes = des1
     });
     cases.Add(new CaseInfo()
     {
         CaseName = "GcWorkbook_Selection_Test_03",
         ControlName = sInfo.ControlName,
         CaseDes = des3
     });
     cases.Add(new CaseInfo()
     {
         CaseName = "GcWorkbook_Selection_Test_05",
         ControlName = sInfo.ControlName,
         CaseDes = des5
     });
     cases.Add(new CaseInfo()
     {
         CaseName = "GcWorkbook_Selection_Test_07",
         ControlName = sInfo.ControlName,
         CaseDes = des7
     });
 }
Exemplo n.º 8
0
 private static void AddDesForScrollingCases(SelectInfo sInfo, List<CaseInfo> cases)
 {
     List<string> des09 = new List<string>();
     List<string> des11 = new List<string>();
     List<string> des25 = new List<string>();
     List<string> des27 = new List<string>();
     if (sInfo.AssemblyType == "SILVERLIGHT")
     {
         des09.Add("GcWorkbook, scroll to next page : one sheet, 100 columns, 1000 rows. 100 cells in screen. Please subtract 0.2s for Time watcher.");
         des11.Add("GcWorkbook, scroll to next page : one sheet, 20 columns, 100000 rows. 100 cells in screen. Please subtract 0.2s for Time watcher.");
         des25.Add("GcWorkbook, scroll to next page : one sheet, 100 columns, 1000 rows, full screen. 432 cells in screen. Please subtract 0.2s for Time watcher.");
         des27.Add("GcWorkbook, scroll to next page : one sheet, 20 columns, 100000 rows, full screen. 432 cells in screen. Please subtract 0.2s for Time watcher.");
     }
     else
     {
         des09.Add("GcWorkbook, scroll to next page : one sheet, 100 columns, 1000 rows. 100 cells in screen.");
         des11.Add("GcWorkbook, scroll to next page : one sheet, 20 columns, 100000 rows. 100 cells in screen.");
         des25.Add("GcWorkbook, scroll to next page : one sheet, 100 columns, 1000 rows, full screen. 432 cells in screen.");
         des27.Add("GcWorkbook, scroll to next page : one sheet, 20 columns, 100000 rows, full screen. 432 cells in screen.");
     }
     cases.Add(new CaseInfo()
     {
         CaseName = "GcWorkbook_PTest2_Scrolling_Test_09",
         ControlName = sInfo.ControlName,
         CaseDes = des09
     });
     cases.Add(new CaseInfo()
     {
         CaseName = "GcWorkbook_PTest2_Scrolling_Test_11",
         ControlName = sInfo.ControlName,
         CaseDes = des11
     });
     cases.Add(new CaseInfo()
     {
         CaseName = "GcWorkbook_PTest2_Scrolling_Test_25",
         ControlName = sInfo.ControlName,
         CaseDes = des25
     });
     cases.Add(new CaseInfo()
     {
         CaseName = "GcWorkbook_PTest2_Scrolling_Test_27",
         ControlName = sInfo.ControlName,
         CaseDes = des27
     });
 }
Exemplo n.º 9
0
        private static void AddDesForLoadCases(SelectInfo sInfo, List<CaseInfo> cases)
        {
            List<String> des1 = new List<string>();
            des1.Add("Load a GcWorkbook(100 columns, 1000 rows).");
            cases.Add(new CaseInfo()
            {
                CaseName = "GcWorkbook_PTest_Load_Test_01",
                ControlName = sInfo.ControlName,
                CaseDes = des1
            });

            List<String> des2 = new List<string>();
            des2.Add("Load a GcWorkbook(20 columns, 100000 rows).");
            cases.Add(new CaseInfo()
            {
                CaseName = "GcWorkbook_PTest_Load_Test_03",
                ControlName = sInfo.ControlName,
                CaseDes = des2
            });
        }
Exemplo n.º 10
0
        private static void AddDesForDataFillingUnboundCases(SelectInfo sInfo, List<CaseInfo> cases)
        {
            List<String> des1 = new List<string>();
            des1.Add("Filling data to a GcWorkbook(100 columns, 1000 rows). Unbound.");
            cases.Add(new CaseInfo()
            {
                CaseName = "GcWorkbook_PTest_DataFilling_Test_01",
                ControlName = sInfo.ControlName,
                CaseDes = des1
            });

            List<String> des2 = new List<string>();
            des2.Add("Filling data to a GcWorkbook(100 columns, 1000 rows), not in form. Unbound.");
            cases.Add(new CaseInfo()
            {
                CaseName = "GcWorkbook_PTest_DataFilling_Test_02",
                ControlName = sInfo.ControlName,
                CaseDes = des2
            });

            List<String> des3 = new List<string>();
            des3.Add("Filling data to a GcWorkbook(20 columns, 100000 rows). Unbound.");
            cases.Add(new CaseInfo()
            {
                CaseName = "GcWorkbook_PTest_DataFilling_Test_03",
                ControlName = sInfo.ControlName,
                CaseDes = des3
            });

            List<String> des4 = new List<string>();
            des4.Add("Filling data to a GcWorkbook(20 columns, 100000 rows), not in form. Unbound.");
            cases.Add(new CaseInfo()
            {
                CaseName = "GcWorkbook_PTest_DataFilling_Test_04",
                ControlName = sInfo.ControlName,
                CaseDes = des4
            });
        }