SHARE
TWEET

Untitled

a guest Oct 14th, 2019 85 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Test setup.
  2. var shop = new CandyShopStub(new DummyCandy());
  3.  
  4. // CandyShopStub.cs
  5. class CandyShopStub : ICandyShop {
  6.  
  7.   private readonly ICandy _candy;
  8.  
  9.   public CandyShopStub(ICandy candy) {
  10.     _candy = candy;
  11.   }
  12.  
  13.   public ICandy GetTopSellingCandy() {
  14.     return _candy;
  15.   }
  16. }
  17.  
  18. // DummyCandy.cs
  19. class DummyCandy : ICandy {}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top