예제 #1
0
        public void TestTwoSnapshots()
        {
            ReportData reportData = TestUtility.PrepaReportData("ReportGenerator",
                                                                null, @".\Data\Sample1Current.json", "AED/applications/3/snapshots/6", "PreVersion 1.5.0 sprint 2 shot 2", "V-1.5.0_Sprint 2_2",
                                                                null, @".\Data\Sample1Previous.json", "AED/applications/3/snapshots/3", "PreVersion 1.4.1 before release", "V-1.4.1");

            reportData = TestUtility.AddApplicationComplexity(reportData, @".\Data\ComplexitySnapCurrent.json", @".\Data\ComplexitySnapPrevious.json");

            var component = new CastComplexity();
            var table     = component.Content(reportData, null);

            var expectedData = new List <string>();

            expectedData.AddRange(new List <string> {
                "CAST Complexity", "Current", "Previous", "Evol.", "% Evol.", "% Total"
            });
            expectedData.AddRange(new List <string> {
                "Low Complexity", "8,881", "8,824", "+57", "+0.65 %", "86.3 %"
            });
            expectedData.AddRange(new List <string> {
                "Average Complexity", "1,167", "1,140", "+27", "+2.37 %", "11.3 %"
            });
            expectedData.AddRange(new List <string> {
                "High Complexity", "172", "170", "+2", "+1.18 %", "1.67 %"
            });
            expectedData.AddRange(new List <string> {
                "Very High Complexity", "71", "68", "+3", "+4.41 %", "0.69 %"
            });
            TestUtility.AssertTableContent(table, expectedData, 6, 5);
        }
예제 #2
0
        public void TestTwoSnapshots()
        {
            ReportData reportData = TestUtility.PrepaReportData("ReportGenerator",
                                                                null, @".\Data\Sample1Current.json", "AED/applications/3/snapshots/6", "PreVersion 1.5.0 sprint 2 shot 2", "V-1.5.0_Sprint 2_2",
                                                                null, @".\Data\Sample1Previous.json", "AED/applications/3/snapshots/3", "PreVersion 1.4.1 before release", "V-1.4.1");

            reportData = TestUtility.AddApplicationComplexity(reportData, @".\Data\ComplexitySnapCurrent.json", @".\Data\ComplexitySnapPrevious.json");

            var component = new CastComplexity();
            var table     = component.Content(reportData, null);

            var expectedData = new List <string>();

            expectedData.AddRange(new List <string> {
                " ", "V-1.5.0_Sprint 2_2", "V-1.4.1"
            });
            expectedData.AddRange(new List <string> {
                " ", "0", "0"
            });
            expectedData.AddRange(new List <string> {
                "Low", "8881", "8824"
            });
            expectedData.AddRange(new List <string> {
                "Average", "1167", "1140"
            });
            expectedData.AddRange(new List <string> {
                "High", "172", "170"
            });
            expectedData.AddRange(new List <string> {
                "Very High", "71", "68"
            });
            expectedData.AddRange(new List <string> {
                " ", "0", "0"
            });
            TestUtility.AssertTableContent(table, expectedData, 3, 7);
        }