Advertisement
Guest User

Untitled

a guest
Oct 14th, 2019
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  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 {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement