public void TestSetUp() { _services = MockRepository.GenerateStub <IApplicationServices>(); _databaseInspector = MockRepository.GenerateStub <IDatabaseInspector>(); _services.Expect(x => x.Resolve <TemplateHost>()).Return(new TemplateHost(_services, _databaseInspector)); _model = new TemplateModel(_services, new NVelocityWrapper()); }
public void TestSetUp() { _services = MockRepository.GenerateStub<IApplicationServices>(); _databaseInspector = MockRepository.GenerateStub<IDatabaseInspector>(); _services.Expect(x => x.Resolve<TemplateHost>()).Return(new TemplateHost(_services, _databaseInspector)); _model = new TemplateModel(_services, new NVelocityWrapper()); }
/// <summary>The show database inspector.</summary> /// <param name="databaseInspector">The database inspector.</param> /// <param name="dockState">The dock state.</param> /// <exception cref="InvalidOperationException"></exception> public void ShowDatabaseInspector(IDatabaseInspector databaseInspector, DockState dockState) { if (_dbInspector != null && _dbInspector != databaseInspector) { _dbInspector.Close(); } _dbInspector = databaseInspector; DockContent frm = _dbInspector as DockContent; if (frm == null) { throw new InvalidOperationException( "The 'databaseInspector' must be a 'WeifenLuo.WinFormsUI.Docking.DockContent' based form."); } frm.Show(dockPanel, dockState); }
/// <summary>Initializes a new instance of the <see cref="FindObjectForm"/> class.</summary> /// <param name="databaseInspector">The database inspector.</param> public FindObjectForm(IDatabaseInspector databaseInspector) { _databaseInspector = databaseInspector; InitializeComponent(); }
/// <summary>Initializes a new instance of the <see cref="TemplateHost"/> class.</summary> /// <param name="applicationServices">The application services.</param> /// <param name="databaseInspector">The database inspector.</param> public TemplateHost(IApplicationServices applicationServices, IDatabaseInspector databaseInspector) { Services = applicationServices; _databaseInspector = databaseInspector; }
/// <summary>Initializes a new instance of the <see cref="FindObjectForm"/> class.</summary> /// <param name="databaseInspector">The database inspector.</param> public FindObjectForm(IDatabaseInspector databaseInspector) { _databaseInspector = databaseInspector; InitializeComponent(); }
public void TestSetUp() { _services = MockRepository.GenerateStub <IApplicationServices>(); _databaseInspector = MockRepository.GenerateStub <IDatabaseInspector>(); _host = new TemplateHost(_services, _databaseInspector); }
/// <summary>Initializes a new instance of the <see cref="TemplateHost"/> class.</summary> /// <param name="applicationServices">The application services.</param> /// <param name="databaseInspector">The database inspector.</param> public TemplateHost(IApplicationServices applicationServices, IDatabaseInspector databaseInspector) { Services = applicationServices; _databaseInspector = databaseInspector; }
public void TestSetUp() { _services = MockRepository.GenerateStub<IApplicationServices>(); _databaseInspector = MockRepository.GenerateStub<IDatabaseInspector>(); _host = new TemplateHost(_services, _databaseInspector); }