Skip to content

Instantly share code, notes, and snippets.

@ankitvijay
Last active August 7, 2020 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ankitvijay/9e0b8542a7ca973a3a70df791b923708 to your computer and use it in GitHub Desktop.
Save ankitvijay/9e0b8542a7ca973a3a70df791b923708 to your computer and use it in GitHub Desktop.
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