public void EligibleForDiscount_NameNotStartsWithA_ReturnsFalse() { DiscountHandler handler = new DiscountHandler(); string name1 = "Bob Anthony"; string name2 = " curt Alanson"; bool discounted1 = handler.EligibleForDiscount(name1); bool discounted2 = handler.EligibleForDiscount(name2); Assert.IsFalse(discounted1, $"Expected name: {name1} to not be eligible for a discount"); Assert.IsFalse(discounted2, $"Expected name: {name2} to not be eligible for a discount"); }
public void EligibleForDiscount_NameStartsWithA_ReturnsTrue() { DiscountHandler handler = new DiscountHandler(); string name1 = "Adam Smith"; string name2 = " alan Curtis "; bool discounted1 = handler.EligibleForDiscount(name1); bool discounted2 = handler.EligibleForDiscount(name2); Assert.IsTrue(discounted1, $"Expected name: {name1} to be eligible for a discount"); Assert.IsTrue(discounted2, $"Expected name: {name2} to be eligible for a discount"); }