Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Part 5 -InheritanceeExample1TestsPart 5 - InheritanceExample1Tests
public class InheritanceExample1Tests
{
[Fact]
public void CanReadAllPaymentTypesForUnitedStates()
{
Assert.Equal("CC", StatesPaymentType.CreditCard.Code);
Assert.Equal("DC", StatesPaymentType.DebitCard.Code);
Assert.Equal("BT", StatesPaymentType.Bitcoin.Code);
}
[Fact]
public void CommonPaymentTypesAreEqual()
{
Assert.Equal(PaymentType.CreditCard, StatesPaymentType.CreditCard);
Assert.Equal(PaymentType.DebitCard, StatesPaymentType.DebitCard);
}
[Fact]
public void CanReadAllPaymentTypesForRestOfTheWorld()
{
Assert.Equal("CC", PaymentType.CreditCard.Code);
Assert.Equal("DC", PaymentType.DebitCard.Code);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.