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();
        }
Exemplo n.º 2
0
        public void RUP_findMetric_TestMethod()
        {
            var mainWindow = new MainWindow();

            // Arrange
            RUPmetric metric_RUP = new RUPmetric(mainWindow);

            metric_RUP.SetInformation_OfMetric();
            metric_RUP.SetAllParametersWithDefaultValue_OfMetric();
            metric_RUP.ChangeValue_OfParameter(0, 3);
            metric_RUP.ChangeValue_OfParameter(1, 6);

            // Act
            double result = metric_RUP.FindMetric();

            // Assert
            Assert.AreEqual(0.5, result);
        }
Exemplo n.º 3
0
        public void RUP_SetInformation_OfMetric_TestMethod()
        {
            // Arrange
            var       mainWindow = new MainWindow();
            RUPmetric metric_RUP = new RUPmetric(mainWindow);

            metric_RUP.SetInformation_OfMetric();

            // Act
            string name       = metric_RUP.Name;
            double max        = metric_RUP.PermisibleMAXvalue;
            double min        = metric_RUP.PermissibleMINvalue;
            int    countParam = metric_RUP.ParametersCount;

            // Assert
            Assert.AreEqual("Метрика звертання до глобальних змінних", name);
            Assert.AreEqual(1, max);
            Assert.AreEqual(0, min);
            Assert.AreEqual(2, countParam);
        }
Exemplo n.º 4
0
        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();
        }