public void TestApplicationsTCPrev() { List <string> snapList = new List <string> { @".\Data\AADMultiCocApp3Snapshots.json", @".\Data\AADMultiCocApp37Snapshots.json" }; List <string> snapResultsList = new List <string> { @".\Data\AADMultiCocApp3SnapshotsResults.json", @".\Data\AADMultiCocApp37SnapshotsResults.json" }; ReportData reportData = TestUtility.PrepaPortfolioReportData(@".\Data\AADMultiCocApplications.json", snapList, snapResultsList); var component = new PortfolioGenericGraph(); Dictionary <string, string> config = new Dictionary <string, string> { { "COL1", "METRICS" }, { "ROW1", "APPLICATIONS" }, { "METRICS", "TECHNICAL_CRITERIA" }, { "APPLICATIONS", "EACH" } }; var table = component.Content(reportData, config); var expectedData = new List <string>(); expectedData.AddRange(new List <string> { "Applications", "Architecture - Multi-Layers and Data Access", "Programming Practices - OO Inheritance and Polymorphism" }); expectedData.AddRange(new List <string> { "ReportGenerator", "1.00", "4.00" }); expectedData.AddRange(new List <string> { "AADAEDAdmin", "3.92", "4.00" }); TestUtility.AssertTableContent(table, expectedData, 3, 3); }
public void TestApplicationsBC() { List <string> snapList = new List <string> { @".\Data\AADMultiCocApp3Snapshots.json", @".\Data\AADMultiCocApp37Snapshots.json" }; List <string> snapResultsList = new List <string> { @".\Data\AADMultiCocApp3SnapshotsResults.json", @".\Data\AADMultiCocApp37SnapshotsResults.json" }; ReportData reportData = TestUtility.PrepaPortfolioReportData(@".\Data\AADMultiCocApplications.json", snapList, snapResultsList); var component = new PortfolioGenericGraph(); Dictionary <string, string> config = new Dictionary <string, string> { { "COL1", "METRICS" }, { "ROW1", "APPLICATIONS" }, { "METRICS", "BUSINESS_CRITERIA" }, { "APPLICATIONS", "EACH" } }; var table = component.Content(reportData, config); var expectedData = new List <string>(); expectedData.AddRange(new List <string> { "Applications", "Transferability", "Changeability", "Robustness", "Efficiency", "SEI Maintainability", "Security", "Total Quality Index", "Programming Practices", "Architectural Design", "Documentation" }); expectedData.AddRange(new List <string> { "ReportGenerator", "3.07", "2.55", "3.32", "2.65", "3.31", "3.30", "3.03", "3.32", "1.81", "2.57" }); expectedData.AddRange(new List <string> { "AADAEDAdmin", "2.97", "3.37", "3.68", "2.71", "3.34", "3.73", "3.30", "3.36", "3.24", "2.17" }); TestUtility.AssertTableContent(table, expectedData, 11, 3); }
public void TestSample3() { // COL1=CRITICAL_VIOLATIONS,ROW1=APPLICATIONS,APPLICATIONS=ALL,CRITICAL_VIOLATIONS=ALL,METRICS=60017 List <string> snapList = new List <string> { @".\Data\AADMultiCocApp3Snapshots.json", @".\Data\AADMultiCocApp37Snapshots.json" }; List <string> snapResultsList = new List <string> { @".\Data\AADMultiCocApp3SnapshotsResults.json", @".\Data\AADMultiCocApp37SnapshotsResults.json" }; ReportData reportData = TestUtility.PrepaPortfolioReportData(@".\Data\AADMultiCocApplications.json", snapList, snapResultsList); var component = new PortfolioGenericGraph(); Dictionary <string, string> config = new Dictionary <string, string> { { "COL1", "CRITICAL_VIOLATIONS" }, { "ROW1", "APPLICATIONS" }, { "APPLICATIONS", "ALL" }, { "CRITICAL_VIOLATIONS", "ALL" }, { "METRICS", "60017" } }; var table = component.Content(reportData, config); var expectedData = new List <string>(); expectedData.AddRange(new List <string> { "Applications", "Total Critical Violations", "Added Critical Violations", "Removed Critical Violations" }); expectedData.AddRange(new List <string> { "2 Applications", "121", "9", "207" }); TestUtility.AssertTableContent(table, expectedData, 4, 2); }
public void TestSample1() { List <string> snapList = new List <string> { @".\Data\AADMultiCocApp3Snapshots.json", @".\Data\AADMultiCocApp37Snapshots.json" }; List <string> snapResultsList = new List <string> { @".\Data\AADMultiCocApp3SnapshotsResults.json", @".\Data\AADMultiCocApp37SnapshotsResults.json" }; ReportData reportData = TestUtility.PrepaPortfolioReportData(@".\Data\AADMultiCocApplications.json", snapList, snapResultsList); var component = new PortfolioGenericGraph(); Dictionary <string, string> config = new Dictionary <string, string> { { "COL1", "METRICS" }, { "ROW1", "APPLICATIONS" }, { "METRICS", "60016" } }; var table = component.Content(reportData, config); var expectedData = new List <string>(); expectedData.AddRange(new List <string> { "Applications", "Security" }); expectedData.AddRange(new List <string> { "2 Applications", "3.51" }); TestUtility.AssertTableContent(table, expectedData, 2, 2); }
public void TestCritViolApp() { List <string> snapList = new List <string> { @".\Data\AADMultiCocApp3Snapshots.json", @".\Data\AADMultiCocApp37Snapshots.json" }; List <string> snapResultsList = new List <string> { @".\Data\AADMultiCocApp3SnapshotsResults.json", @".\Data\AADMultiCocApp37SnapshotsResults.json" }; ReportData reportData = TestUtility.PrepaPortfolioReportData(@".\Data\AADMultiCocApplications.json", snapList, snapResultsList); var component = new PortfolioGenericGraph(); Dictionary <string, string> config = new Dictionary <string, string> { { "COL1", "CRITICAL_VIOLATIONS" }, { "ROW1", "APPLICATIONS" }, { "APPLICATIONS", "EACH" }, { "CRITICAL_VIOLATIONS", "ALL" }, { "METRICS", "60017" } }; var table = component.Content(reportData, config); var expectedData = new List <string>(); expectedData.AddRange(new List <string> { "Applications", "Total Critical Violations", "Added Critical Violations", "Removed Critical Violations" }); expectedData.AddRange(new List <string> { "ReportGenerator", "41", "0", "33" }); expectedData.AddRange(new List <string> { "AADAEDAdmin", "80", "9", "174" }); TestUtility.AssertTableContent(table, expectedData, 4, 3); }
public void TestApplicationsSize() { List <string> snapList = new List <string> { @".\Data\AADMultiCocApp3Snapshots.json", @".\Data\AADMultiCocApp37Snapshots.json" }; List <string> snapResultsList = new List <string> { @".\Data\AADMultiCocApp3SnapshotsResults.json", @".\Data\AADMultiCocApp37SnapshotsResults.json" }; ReportData reportData = TestUtility.PrepaPortfolioReportData(@".\Data\AADMultiCocApplications.json", snapList, snapResultsList); var component = new PortfolioGenericGraph(); Dictionary <string, string> config = new Dictionary <string, string> { { "COL1", "METRICS" }, { "ROW1", "APPLICATIONS" }, { "METRICS", "TECHNICAL_SIZING" }, { "APPLICATIONS", "EACH" } }; var table = component.Content(reportData, config); var expectedData = new List <string>(); expectedData.AddRange(new List <string> { "Applications", "Number of Code Lines" }); expectedData.AddRange(new List <string> { "ReportGenerator", "29486" }); expectedData.AddRange(new List <string> { "AADAEDAdmin", "38103" }); TestUtility.AssertTableContent(table, expectedData, 2, 3); }
public void TestAppTechnoCritViol() { List <string> snapList = new List <string> { @".\Data\AADMultiCocApp3Snapshots.json", @".\Data\AADMultiCocApp37Snapshots.json" }; List <string> snapResultsList = new List <string> { @".\Data\AADMultiCocApp3SnapshotsResults.json", @".\Data\AADMultiCocApp37SnapshotsResults.json" }; ReportData reportData = TestUtility.PrepaPortfolioReportData(@".\Data\AADMultiCocApplications.json", snapList, snapResultsList); reportData.Applications[0].Technologies = new[] { ".NET" }; reportData.Applications[1].Technologies = new[] { "JEE", "SQL Analyzer" }; var component = new PortfolioGenericGraph(); Dictionary <string, string> config = new Dictionary <string, string> { { "COL1", "APPLICATIONS" }, { "ROW1", "CRITICAL_VIOLATIONS" }, { "ROW11", "TECHNOLOGIES" }, { "CRITICAL_VIOLATIONS", "ADDED" }, { "TECHNOLOGIES", "EACH" }, { "APPLICATIONS", "EACH" } }; var table = component.Content(reportData, config); var expectedData = new List <string>(); expectedData.AddRange(new List <string> { "Critical Violations", "ReportGenerator", "AADAEDAdmin" }); expectedData.AddRange(new List <string> { "Added Critical Violations", " ", " " }); expectedData.AddRange(new List <string> { " .NET", "0", "n/a" }); expectedData.AddRange(new List <string> { " JEE", "n/a", "8" }); expectedData.AddRange(new List <string> { " SQL Analyzer", "n/a", "1" }); TestUtility.AssertTableContent(table, expectedData, 3, 5); }
public void TestSample4() { // COL1=CRITICAL_VIOLATIONS,ROW1=METRICS,METRICS=HEALTH_FACTOR,CRITICAL_VIOLATIONS=ADDED|REMOVED List <string> snapList = new List <string> { @".\Data\AADMultiCocApp3Snapshots.json", @".\Data\AADMultiCocApp37Snapshots.json" }; List <string> snapResultsList = new List <string> { @".\Data\AADMultiCocApp3SnapshotsResults.json", @".\Data\AADMultiCocApp37SnapshotsResults.json" }; ReportData reportData = TestUtility.PrepaPortfolioReportData(@".\Data\AADMultiCocApplications.json", snapList, snapResultsList); var component = new PortfolioGenericGraph(); Dictionary <string, string> config = new Dictionary <string, string> { { "COL1", "CRITICAL_VIOLATIONS" }, { "ROW1", "METRICS" }, { "CRITICAL_VIOLATIONS", "ADDED|REMOVED" }, { "METRICS", "HEALTH_FACTOR" } }; var table = component.Content(reportData, config); var expectedData = new List <string>(); expectedData.AddRange(new List <string> { "Metrics", "Added Critical Violations", "Removed Critical Violations" }); expectedData.AddRange(new List <string> { "Transferability", "0", "6" }); expectedData.AddRange(new List <string> { "Changeability", "0", "97" }); expectedData.AddRange(new List <string> { "Robustness", "0", "10" }); expectedData.AddRange(new List <string> { "Efficiency", "9", "106" }); expectedData.AddRange(new List <string> { "Security", "0", "91" }); TestUtility.AssertTableContent(table, expectedData, 3, 6); }
public void TestSample6() { // ROW1=TECHNOLOGIES,COL1=METRICS,TECHNOLOGIES=EACH,METRICS=10151,AGGREGATORS=SUM List <string> snapList = new List <string> { @".\Data\AADMultiCocApp3Snapshots.json", @".\Data\AADMultiCocApp37Snapshots.json" }; List <string> snapResultsList = new List <string> { @".\Data\AADMultiCocApp3SnapshotsResults.json", @".\Data\AADMultiCocApp37SnapshotsResults.json" }; ReportData reportData = TestUtility.PrepaPortfolioReportData(@".\Data\AADMultiCocApplications.json", snapList, snapResultsList); reportData.Applications[0].Technologies = new[] { ".NET" }; reportData.Applications[1].Technologies = new[] { "JEE", "SQL Analyzer" }; var component = new PortfolioGenericGraph(); Dictionary <string, string> config = new Dictionary <string, string> { { "COL1", "METRICS" }, { "ROW1", "TECHNOLOGIES" }, { "METRICS", "10151" }, { "AGGREGATORS", "SUM" }, { "TECHNOLOGIES", "EACH" } }; var table = component.Content(reportData, config); var expectedData = new List <string>(); expectedData.AddRange(new List <string> { "Technologies", "Number of Code Lines" }); expectedData.AddRange(new List <string> { ".NET", "29486" }); expectedData.AddRange(new List <string> { "JEE", "12649" }); expectedData.AddRange(new List <string> { "SQL Analyzer", "25454" }); TestUtility.AssertTableContent(table, expectedData, 2, 4); }
public void TestSample5() { // COL1=APPLICATIONS,ROW1=METRICS,METRICS=60013|60014|60016,AGGREGATORS=AVERAGE,APPLICATIONS=ALL List <string> snapList = new List <string> { @".\Data\AADMultiCocApp3Snapshots.json", @".\Data\AADMultiCocApp37Snapshots.json" }; List <string> snapResultsList = new List <string> { @".\Data\AADMultiCocApp3SnapshotsResults.json", @".\Data\AADMultiCocApp37SnapshotsResults.json" }; ReportData reportData = TestUtility.PrepaPortfolioReportData(@".\Data\AADMultiCocApplications.json", snapList, snapResultsList); var component = new PortfolioGenericGraph(); Dictionary <string, string> config = new Dictionary <string, string> { { "COL1", "APPLICATIONS" }, { "ROW1", "METRICS" }, { "APPLICATIONS", "ALL" }, { "METRICS", "60013|60014|60016" }, { "AGGREGATORS", "AVERAGE" } }; var table = component.Content(reportData, config); var expectedData = new List <string>(); expectedData.AddRange(new List <string> { "Metrics", "2 Applications" }); expectedData.AddRange(new List <string> { "Robustness", "3.50" }); expectedData.AddRange(new List <string> { "Efficiency", "2.68" }); expectedData.AddRange(new List <string> { "Security", "3.51" }); TestUtility.AssertTableContent(table, expectedData, 2, 4); }