Free cookie consent management tool by TermsFeed Policy Generator

source: branches/WebApplication/Administration.Tests/Views/DefaultViewPresenterFixture.cs @ 4793

Last change on this file since 4793 was 4478, checked in by cfleisch, 14 years ago

Deleted binaries, added test function (#1198)

File size: 2.5 KB
Line 
1using System;
2using System.Text;
3using System.Collections.Generic;
4using Microsoft.VisualStudio.TestTools.UnitTesting;
5using OKB.Administration.Views;
6using OKB.Administration.Tests.Mocks;
7
8namespace OKB.Administration.Tests
9{
10    /// <summary>
11    /// Summary description for DefaultViewPresenterTestFixture
12    /// </summary>
13    [TestClass]
14    public class DefaultViewPresenterTestFixture
15    {
16        public DefaultViewPresenterTestFixture()
17        {
18        }
19
20        #region Additional test attributes
21        //
22        // You can use the following additional attributes as you write your tests:
23        //
24        // Use ClassInitialize to run code before running the first test in the class
25        // [ClassInitialize()]
26        // public static void MyClassInitialize(TestContext testContext) { }
27        //
28        // Use ClassCleanup to run code after all tests in a class have run
29        // [ClassCleanup()]
30        // public static void MyClassCleanup() { }
31        //
32        // Use TestInitialize to run code before running each test
33        // [TestInitialize()]
34        // public void MyTestInitialize() { }
35        //
36        // Use TestCleanup to run code after each test has run
37        // [TestCleanup()]
38        // public void MyTestCleanup() { }
39        //
40        #endregion
41
42        // Eg.: this is a unit tests taken from the reference implementation
43        //
44        //[TestMethod]
45        //public void OnViewLoadedCallsControllerGetTransfersAndSetsTransfersInView()
46        //{
47        //    MockElectronicFundsTransferController controller = new MockElectronicFundsTransferController();
48        //    Transfer transfer = new Transfer();
49        //    controller.Transfers = new Transfer[] { transfer };
50        //    DefaultViewPresenter presenter = new DefaultViewPresenter(controller);
51        //    MockDefaultView view = new MockDefaultView();
52        //    presenter.View = view;
53
54        //    presenter.OnViewLoaded();
55
56        //    Assert.IsTrue(controller.GetTransfersCalled);
57        //    Assert.IsTrue(view.TransfersSet);
58        //    Assert.AreEqual(1, view.Transfers.Length);
59        //    Assert.AreSame(transfer, view.Transfers[0]);
60        //}
61    }
62    namespace Mocks
63    {
64        class MockDefaultView : IDefaultView
65        {
66
67            #region IDefaultView Members
68
69            public string GetDateTimeString()
70            {
71                throw new NotImplementedException();
72            }
73
74            #endregion
75        }
76    }
77}
Note: See TracBrowser for help on using the repository browser.