示例#1
0
        public void ShouldAttachToAllEvents()
        {
            view = mocks.StrictMock <IProfileView>();
            EventHelper.EventIsAttached(() => { view.Confirm += null; });
            EventHelper.EventIsAttached(() => { view.SelectProfileIcon += null; });
            mocks.ReplayAll();
            var controller = new ProfileController();

            controller.SetView(view);
        }
示例#2
0
        public void ShouldAttachToLoadModel()
        {
            manager = mocks.StrictMock <IDataManager>();
            EventHelper.EventIsAttached(() => { manager.DataLoaded += null; });
            manager.Stub(x => x.IsIFLoaded()).Return(false);
            mocks.ReplayAll();
            var controller = new ProfileController();

            controller.SetManager(manager);
        }
示例#3
0
 public void ShouldAttachToAllEvents()
 {
     view = mocks.StrictMock <IMainView>();
     EventHelper.EventIsAttached(() => { view.ApplyProfile += null; });
     EventHelper.EventIsAttached(() => { view.RemoveProfile += null; });
     EventHelper.EventIsAttached(() => { view.ChangeProfile += null; });
     EventHelper.EventIsAttached(() => { view.NewProfile += null; });
     EventHelper.EventIsAttached(() => { view.Exit += null; });
     EventHelper.EventIsAttached(() => { view.OpenAbout += null; });
     EventHelper.EventIsAttached(() => { view.OpenSettings += null; });
     EventHelper.EventIsAttached(() => { view.CreateShortcut += null; });
     mocks.ReplayAll();
     new MainController(view, manager);
 }