Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public abstract class RandomPaymentStrategy : IPaymentStrategy
public ProcessStatus Process(double amount)
var random = new Random();
var randomValue = random.Next(0, 2);
return (ProcessStatus)Math.Min(randomValue, 2);
public class PaypalPaymentStrategy : RandomPaymentStrategy { }
public class ApplePayPaymentStrategy : RandomPaymentStrategy { }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment