public void TestNameTest(double balance, int year, double expected)
    {
        var    goldCard        = new GoldCard("", "", balance, year);
        double calcCouponValue = goldCard.CalcCouponValue();

        Assert.AreEqual(expected, calcCouponValue);
    }
Esempio n. 2
0
 // add more test cases so all rules are defined
 public void CalcCouponValue_should_calculate_correctly(double balance, double year, double expectedResult)
 {
      // arrange your test (sut == system under test)
      var sut = new GoldCard(null, null, balance, year);
      // act (execute the test)
      var actualResult = sut.CalcCouponValue();
      // assert (verify that what you get is what you want)
      Assert.That(actualResult, Is.EqualTo(expectedResult);             
 }