public WindowSearchMetricOrParameter() { InitializeComponent(); titleBar.MouseLeftButtonDown += (o, e) => DragMove(); chpMetric.SetInformation_OfMetric(); cppMetric.SetInformation_OfMetric(); rupMetric.SetInformation_OfMetric(); mmtMetric.SetInformation_OfMetric(); mbqMetric.SetInformation_OfMetric(); sctMetric.SetInformation_OfMetric(); sdtMetric.SetInformation_OfMetric(); sccMetric.SetInformation_OfMetric(); sqcMetric.SetInformation_OfMetric(); cptMetric.SetInformation_OfMetric(); cccMetric.SetInformation_OfMetric(); fpMetric.SetInformation_OfMetric(); lcMetric.SetInformation_OfMetric(); dpMetric.SetInformation_OfMetric(); rupMetric.SetAllParametersWithDefaultValue_OfMetric(); mmtMetric.SetAllParametersWithDefaultValue_OfMetric(); mbqMetric.SetAllParametersWithDefaultValue_OfMetric(); sctMetric.SetAllParametersWithDefaultValue_OfMetric(); sdtMetric.SetAllParametersWithDefaultValue_OfMetric(); sccMetric.SetAllParametersWithDefaultValue_OfMetric(); sqcMetric.SetAllParametersWithDefaultValue_OfMetric(); cptMetric.SetAllParametersWithDefaultValue_OfMetric(); cccMetric.SetAllParametersWithDefaultValue_OfMetric(); fpMetric.SetAllParametersWithDefaultValue_OfMetric(); lcMetric.SetAllParametersWithDefaultValue_OfMetric(); dpMetric.SetAllParametersWithDefaultValue_OfMetric(); }
public void CPT_findMetric_TestMethod() { // Arrange var mainWindow = new MainWindow(); CPTmetric metric_CPT = new CPTmetric(mainWindow); metric_CPT.SetInformation_OfMetric(); metric_CPT.SetAllParametersWithDefaultValue_OfMetric(); metric_CPT.CountOfFunction = 1; metric_CPT.ChangeValue_OfParameter(0, 34); metric_CPT.ChangeValue_OfParameter(1, 23); metric_CPT.ChangeValue_OfParameter(2, 1); // Act double result = metric_CPT.FindMetric(); // Assert Assert.AreEqual(0.676, result); }
public void CPT_SetInformation_OfMetric_TestMethod() { // Arrange var mainWindow = new MainWindow(); CPTmetric metric_CPT = new CPTmetric(mainWindow); metric_CPT.SetInformation_OfMetric(); // Act string name = metric_CPT.Name; double max = metric_CPT.PermisibleMAXvalue; double min = metric_CPT.PermissibleMINvalue; int countParam = metric_CPT.ParametersCount; // Assert Assert.AreEqual("Метрика прогнозування продуктивності розроблення ПЗ", name); Assert.AreEqual(5, max); Assert.AreEqual(-1, min); Assert.AreNotEqual(4, countParam); }
public ViewWindowOfMetric() { InitializeComponent(); titleBar.MouseLeftButtonDown += (o, e) => DragMove(); //CHP chpMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric1 = new MyTableInfo_OfAllMetrics() { Number = 1, Name = chpMetric.Name, MIN = chpMetric.PermissibleMINvalue, MAX = chpMetric.PermisibleMAXvalue, Count = chpMetric.ParametersCount }; allMetrics.Add(Metric1); //CPP cppMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric2 = new MyTableInfo_OfAllMetrics() { Number = 2, Name = cppMetric.Name, MIN = cppMetric.PermissibleMINvalue, MAX = cppMetric.PermisibleMAXvalue, Count = cppMetric.ParametersCount }; allMetrics.Add(Metric2); //RUP rupMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric3 = new MyTableInfo_OfAllMetrics() { Number = 3, Name = rupMetric.Name, MIN = rupMetric.PermissibleMINvalue, MAX = rupMetric.PermisibleMAXvalue, Count = rupMetric.ParametersCount }; allMetrics.Add(Metric3); //MMT mmtMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric4 = new MyTableInfo_OfAllMetrics() { Number = 4, Name = mmtMetric.Name, MIN = mmtMetric.PermissibleMINvalue, MAX = mmtMetric.PermisibleMAXvalue, Count = mmtMetric.ParametersCount }; allMetrics.Add(Metric4); //MBQ mbqMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric5 = new MyTableInfo_OfAllMetrics() { Number = 5, Name = mbqMetric.Name, MIN = mbqMetric.PermissibleMINvalue, MAX = mbqMetric.PermisibleMAXvalue, Count = mbqMetric.ParametersCount }; allMetrics.Add(Metric5); //SCT sctMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric6 = new MyTableInfo_OfAllMetrics() { Number = 6, Name = sctMetric.Name, MIN = sctMetric.PermissibleMINvalue, MAX = sctMetric.PermisibleMAXvalue, Count = sctMetric.ParametersCount }; allMetrics.Add(Metric6); //SDT sdtMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric7 = new MyTableInfo_OfAllMetrics() { Number = 7, Name = sdtMetric.Name, MIN = sdtMetric.PermissibleMINvalue, MAX = sdtMetric.PermisibleMAXvalue, Count = sdtMetric.ParametersCount }; allMetrics.Add(Metric7); //SCC sccMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric8 = new MyTableInfo_OfAllMetrics() { Number = 8, Name = sccMetric.Name, MIN = sccMetric.PermissibleMINvalue, MAX = sccMetric.PermisibleMAXvalue, Count = sccMetric.ParametersCount }; allMetrics.Add(Metric8); //SQC sqcMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric9 = new MyTableInfo_OfAllMetrics() { Number = 9, Name = sqcMetric.Name, MIN = sqcMetric.PermissibleMINvalue, MAX = sqcMetric.PermisibleMAXvalue, Count = sqcMetric.ParametersCount }; allMetrics.Add(Metric9); //CPT cptMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric10 = new MyTableInfo_OfAllMetrics() { Number = 10, Name = cptMetric.Name, MIN = cptMetric.PermissibleMINvalue, MAX = cptMetric.PermisibleMAXvalue, Count = cptMetric.ParametersCount }; allMetrics.Add(Metric10); //CCC cccMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric11 = new MyTableInfo_OfAllMetrics() { Number = 11, Name = cccMetric.Name, MIN = cccMetric.PermissibleMINvalue, MAX = cccMetric.PermisibleMAXvalue, Count = cccMetric.ParametersCount }; allMetrics.Add(Metric11); //FP fpMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric12 = new MyTableInfo_OfAllMetrics() { Number = 12, Name = fpMetric.Name, MIN = fpMetric.PermissibleMINvalue, MAX = fpMetric.PermisibleMAXvalue, Count = fpMetric.ParametersCount }; allMetrics.Add(Metric12); //LC lcMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric13 = new MyTableInfo_OfAllMetrics() { Number = 13, Name = lcMetric.Name, MIN = lcMetric.PermissibleMINvalue, MAX = lcMetric.PermisibleMAXvalue, Count = lcMetric.ParametersCount }; allMetrics.Add(Metric13); //DP dpMetric.SetInformation_OfMetric(); MyTableInfo_OfAllMetrics Metric14 = new MyTableInfo_OfAllMetrics() { Number = 14, Name = dpMetric.Name, MIN = dpMetric.PermissibleMINvalue, MAX = dpMetric.PermisibleMAXvalue, Count = dpMetric.ParametersCount }; allMetrics.Add(Metric14); AllMetricsInfo_dataGrid.ItemsSource = allMetrics; AllMetricsInfo_dataGrid.Items.Refresh(); }