Exemplo n.º 1
0
        public void TestCalcPremium()
        {
            double expectedResult = 5;
            double actualResult   = p1.CalcPremium(20, "female");

            Assert.That(actualResult, Is.EqualTo(expectedResult), "Test of premium Passed for female aged 20", premium);
        }
Exemplo n.º 2
0
        public static void Test1()
        {
            double expectedResult = 5;

            double actualResult = p.CalcPremium(25, "female");

            Assert.AreEqual(expectedResult, actualResult);
        }
Exemplo n.º 3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string  gender = TextBox1.Text;
            int     age    = Convert.ToInt32(TextBox2);
            Premium prem   = new Premium();
            double  g      = prem.CalcPremium(age, gender);

            Label3.Text = Convert.ToString(g);
        }
Exemplo n.º 4
0
        protected void SubmitButton_Click(object sender, EventArgs e)
        {
            Premium c1     = new Premium();
            int     age    = int.Parse(TextboxAge.Text);
            string  gender = TextboxGender.Text;

            Gender.Text  = "Gender: " + gender;
            Age.Text     = "Age: " + age.ToString();
            Premium.Text = "Premium: $" + c1.CalcPremium(age, gender).ToString();
        }
Exemplo n.º 5
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            Premium c1     = new Premium();
            int     age    = int.Parse(TextBox1.Text);
            string  gender = TextBox2.Text;

            Gender.Text  += gender;
            Age.Text     += age.ToString();
            Premium.Text += "$" + c1.CalcPremium(age, gender).ToString();
        }
Exemplo n.º 6
0
        public void ageTest2()
        {
            var age = new Premium();

            Assert.AreEqual(2.5 * 0.15, age.CalcPremium(51, "female"));
        }
Exemplo n.º 7
0
 public double DeterminePremium()
 {
     return(lc.CalcPremium(age, Gender));
 }
Exemplo n.º 8
0
        public void maleAgeTest3()
        {
            var male = new Premium();

            Assert.AreEqual(0, male.CalcPremium(16, "male"));
        }
Exemplo n.º 9
0
        public void genderTest()
        {
            var gender = new Premium();

            Assert.AreEqual(0, gender.CalcPremium(24, ""));
        }
Exemplo n.º 10
0
        public void maleAgeTest2()
        {
            var male = new Premium();

            Assert.AreEqual(5, male.CalcPremium(36, "male"));
        }
Exemplo n.º 11
0
        public void maleAgeTest1()
        {
            var male = new Premium();

            Assert.AreEqual(6, male.CalcPremium(21, "male"));
        }
Exemplo n.º 12
0
        public void femaleAgeTest3()
        {
            var female = new Premium();

            Assert.AreEqual(0, female.CalcPremium(17, "female"));
        }
Exemplo n.º 13
0
        public void femaleAgeTest2()
        {
            var female = new Premium();

            Assert.AreEqual(2.50, female.CalcPremium(31, "female"));
        }
Exemplo n.º 14
0
        public void femaleAgeTest1()
        {
            var female = new Premium();

            Assert.AreEqual(5, female.CalcPremium(20, "female"));
        }