Skip to content

Instantly share code, notes, and snippets.

@ankitvijay
Created July 24, 2020 21:51
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/aec484266bafafddab1b0eaf19de5619 to your computer and use it in GitHub Desktop.
Save ankitvijay/aec484266bafafddab1b0eaf19de5619 to your computer and use it in GitHub Desktop.
Part 5 - InheritanceExample2Tests
using System;
using AV.Enumeration.Sample.Inheritance.Example2;
using Xunit;
namespace Enumeration.Sample.Inheritance.Example2.Tests
{
public class InheritanceExample2Tests
{
[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