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