Ejemplo n.º 1
0
        private void ActionReturnHigh(int dets, int ftrs, string type)
        {
            double result = 0;

            if (UMLActionType.EI == type)
            {
                result = HelperEstimation.CalculateActionFunctionPoints(UMLActionType.EI, dets, ftrs);
                Assert.AreNotEqual(0, result);
                Assert.AreNotEqual(3, result);
                Assert.AreNotEqual(4, result);
                Assert.AreEqual(6, result);
            }
            else if (UMLActionType.EQ == type)
            {
                result = HelperEstimation.CalculateActionFunctionPoints(UMLActionType.EQ, dets, ftrs);
                Assert.AreNotEqual(0, result);
                Assert.AreNotEqual(3, result);
                Assert.AreNotEqual(4, result);
                Assert.AreEqual(6, result);
            }

            else if (UMLActionType.EO == type)
            {
                result = HelperEstimation.CalculateActionFunctionPoints(UMLActionType.EO, dets, ftrs);
                Assert.AreNotEqual(0, result);
                Assert.AreNotEqual(4, result);
                Assert.AreNotEqual(5, result);
                Assert.AreEqual(7, result);
            }
            //System.Console.WriteLine(String.Format("Eval -- > Dets:{0}, Ftrs:{1} - result:{2}", dets, ftrs, result));
        }
Ejemplo n.º 2
0
        private void btnReset_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("Do you want rest the factors", "", MessageBoxButtons.OKCancel) == DialogResult.OK)
            {
                HelperEstimation.ResetProfile();

                _factors = UMLFactorCollection.GetFactors(true);

                BindingListView <UMLFactor> view = new BindingListView <UMLFactor>(_factors);
                this.uMLFactorCollectionBindingSource.DataSource = view;
                view.RemovingItem += new RemoveEventHandler <UMLFactor>(view_RemovingItem);
            }
        }
Ejemplo n.º 3
0
        private void FileReturnHigh(int dets, int rets, string type)
        {
            double result = 0;

            if (UMLFileType.ILF == type)
            {
                result = HelperEstimation.CalculateFileFunctionPoints(UMLFileType.ILF, dets, rets);
                Assert.AreNotEqual(0, result);
                Assert.AreNotEqual(7, result);
                Assert.AreNotEqual(10, result);
                Assert.AreEqual(15, result);
            }
            else if (UMLFileType.EIF == type)
            {
                result = HelperEstimation.CalculateFileFunctionPoints(UMLFileType.EIF, dets, rets);
                Assert.AreNotEqual(0, result);
                Assert.AreNotEqual(5, result);
                Assert.AreNotEqual(7, result);
                Assert.AreEqual(10, result);
            }
            //System.Console.WriteLine(String.Format("Eval -- > Dets:{0}, Rets:{1} - result:{2}", dets, rets, result));
        }
Ejemplo n.º 4
0
 private void btnSaveFactors_Click(object sender, EventArgs e)
 {
     HelperEstimation.WriteFactorsInProfile(_factors);
 }