PageRenderTime 22ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/V2/trunk/RI/Desktop/StockTraderRI.Modules.Position.Tests/Orders/OrdersPresenterFixture.cs

#
C# | 56 lines | 32 code | 5 blank | 19 comment | 0 complexity | 531af4e7becefcc3558435b843380dd3 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 System;
18using System.Text;
19using System.Collections.Generic;
20using System.Linq;
21using Microsoft.VisualStudio.TestTools.UnitTesting;
22using Microsoft.Practices.Unity;
23using StockTraderRI.Modules.Position.Tests.Mocks;
24using StockTraderRI.Modules.Position.Interfaces;
25using StockTraderRI.Modules.Position.Orders;
26
27namespace StockTraderRI.Modules.Position.Tests.Orders
28{
29    /// <summary>
30    /// Summary description for OrdersPresenterFixture
31    /// </summary>
32    [TestClass]
33    public class OrdersPresenterFixture
34    {
35        MockOrdersView view;
36
37        [TestInitialize]
38        public void SetUp()
39        {
40            view = new MockOrdersView();
41        }
42
43        [TestMethod]
44        public void CanInitPresenter()
45        {
46            OrdersPresentationModel presentationModel = CreatePresenter();
47
48            Assert.AreEqual<IOrdersView>(view, presentationModel.View);
49        }
50
51        private OrdersPresentationModel CreatePresenter()
52        {
53            return new OrdersPresentationModel(view);
54        }
55    }
56}