PageRenderTime 41ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/V2.2/trunk/RI/Desktop/StockTraderRI.Modules.News.Tests/Mocks/MockNewsReaderView.cs

#
C# | 44 lines | 23 code | 5 blank | 16 comment | 0 complexity | 5d63589c58ee7f53b9a28ff3134884c5 MD5 | raw file
  1. //===================================================================================
  2. // Microsoft patterns & practices
  3. // Composite Application Guidance for Windows Presentation Foundation and Silverlight
  4. //===================================================================================
  5. // Copyright (c) Microsoft Corporation. All rights reserved.
  6. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY
  7. // OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
  8. // LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
  9. // FITNESS FOR A PARTICULAR PURPOSE.
  10. //===================================================================================
  11. // The example companies, organizations, products, domain names,
  12. // e-mail addresses, logos, people, places, and events depicted
  13. // herein are fictitious. No association with any real company,
  14. // organization, product, domain name, email address, logo, person,
  15. // places, or events is intended or should be inferred.
  16. //===================================================================================
  17. using StockTraderRI.Infrastructure.Models;
  18. using StockTraderRI.Modules.News.Article;
  19. namespace StockTraderRI.Modules.News.Tests.Mocks
  20. {
  21. internal class MockNewsReaderView : INewsReaderView
  22. {
  23. public bool ShowViewWasCalled { get; private set; }
  24. private NewsArticle model;
  25. public void ShowView()
  26. {
  27. this.ShowViewWasCalled = true;
  28. }
  29. public NewsArticle Model
  30. {
  31. get { return this.model; }
  32. set { this.model = value; }
  33. }
  34. public void SetNewsArticle(NewsArticle article)
  35. {
  36. this.Model = article;
  37. }
  38. }
  39. }