Esempio n. 1
0
        public static void Main(string[] args)
        {
            PayrollDatabase database =
                new InMemoryPayrollDatabase();
            WindowViewLoader viewLoader =
                new WindowViewLoader(database);

            viewLoader.LoadPayrollView();
            Application.Run(viewLoader.LastLoadedView);
        }
Esempio n. 2
0
        public void LoadPayrollView()
        {
            viewLoader.LoadPayrollView();

            Form form = viewLoader.LastLoadedView;

            Assert.IsTrue(form is PayrollWindow);
            Assert.IsTrue(form.Visible);

            PayrollWindow    payrollWindow = form as PayrollWindow;
            PayrollPresenter presenter     = payrollWindow.Presenter;

            Assert.IsNotNull(presenter);
            Assert.AreSame(form, presenter.View);
        }