PageRenderTime 28ms CodeModel.GetById 20ms app.highlight 4ms RepoModel.GetById 1ms 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//===================================================================================
17using StockTraderRI.Infrastructure.Models;
18using StockTraderRI.Modules.News.Article;
19
20namespace StockTraderRI.Modules.News.Tests.Mocks
21{
22    internal class MockNewsReaderView : INewsReaderView
23    {
24        public bool ShowViewWasCalled { get; private set; }
25
26        private NewsArticle model;
27
28        public void ShowView()
29        {
30            this.ShowViewWasCalled = true;
31        }
32
33        public NewsArticle Model
34        {
35            get { return this.model; }
36            set { this.model = value; }
37        }
38
39        public void SetNewsArticle(NewsArticle article)
40        {
41            this.Model = article;
42        }
43    }
44}