public void Initialize() { _mockedModuleController = new Mock <IModuleController>(); _mockedDialogService = new Mock <IDialogService>(); _customerMaintenanceController = new CustomerMaintenanceController(_mockedModuleController.Object, _mockedDialogService.Object); _view = new CustomerMaintenanceForm(_customerMaintenanceController); }
public void Initialize() { _mockedModuleController = new Mock <IModuleController>(); _mockedDialogService = new Mock <IDialogService>(); _mockedCustomerMaintenanceView = new Mock <ICustomerMaintenanceView>(); _controller = new CustomerMaintenanceController(_mockedModuleController.Object, _mockedDialogService.Object); _controller.View = _mockedCustomerMaintenanceView.Object; _mockedDatabaseObjectCollection = new Mock <IDatabaseObjectCollection>(); _mockedProgramFlowManager = new Mock <IProgramFlowManager>(); _mockedCustomerDbo = new Mock <ICustomerDbo>(); _mockedDatabaseObjectCollection.Setup(databaseObjectCollection => databaseObjectCollection.GetDbo <ICustomerDbo>()).Returns(_mockedCustomerDbo.Object); _mockedModuleController.Setup(moduleController => moduleController.GetCollection <IDatabaseObjectCollection>()).Returns(_mockedDatabaseObjectCollection.Object); _mockedModuleController.Setup(moduleController => moduleController.GetService <IProgramFlowManager>()).Returns(_mockedProgramFlowManager.Object); }
public CustomerMaintenanceForm(CustomerMaintenanceController controller) { InitializeComponent(); Controller = controller; }