コード例 #1
0
ファイル: TestClass.cs プロジェクト: S00170902/SQAAssignment
        //Female ((age >= 18) && (age <= 30))
        public static void female_25_5()
        {
            expectedResult = 5f;
            float actualResult = insuranceService.CalcPremium(25, "female");

            Assert.AreEqual(expectedResult, actualResult);
        }
コード例 #2
0
        protected void btn_Click(object sender, EventArgs e)
        {
            string a = age.Text;

            System.Diagnostics.Debug.WriteLine(a);
            int ageInput = int.Parse(a);

            float premium = ins.CalcPremium(ageInput, genderInput);

            prem.Text = "Your premium is: " + premium.ToString();
        }
コード例 #3
0
        public float premium()
        {
            InsuranceService insuranceService = new InsuranceService();

            return(insuranceService.CalcPremium(age, gender));
        }