public void CreateWithNullDialogServiceWillThrow(IProductManagementAgent dummyAgent) { // Fixture setup // Exercise system and verify outcome Assert.Throws <ArgumentNullException>(() => new MainWindowViewModel(dummyAgent, null)); // Teardown }
public void CreateWithNullDialogServiceWillThrow(IProductManagementAgent dummyAgent) { // Fixture setup // Exercise system and verify outcome Assert.Throws<ArgumentNullException>(() => new MainWindowViewModel(dummyAgent, null)); // Teardown }
public ErrorHandlingProductManagementAgent(IProductManagementAgent agent) { if (agent == null) { throw new ArgumentNullException("agent"); } this.innerAgent = agent; }
public MainWindowViewModelFactory(IProductManagementAgent agent) { if (agent == null) { throw new ArgumentNullException("agent"); } this.agent = agent; }
public CircuitBreakerProductManagementAgent(IProductManagementAgent agent, ICircuitBreaker breaker) { if (agent == null) { throw new ArgumentNullException("agent"); } if (breaker == null) { throw new ArgumentNullException("breaker"); } this.innerAgent = agent; this.breaker = breaker; }
public MainWindowViewModel(IProductManagementAgent agent, IWindow window) { if (agent == null) { throw new ArgumentNullException("agent"); } if (window == null) { throw new ArgumentNullException("window"); } this.agent = agent; this.window = window; this.products = new ObservableCollection <ProductViewModel>(); this.closeCommand = new RelayCommand(this.Close); this.deleteProductCommand = new RelayCommand(this.DeleteProduct, this.IsProductSelected); this.editProductCommand = new RelayCommand(this.EditProduct, this.IsProductSelected); this.insertProductCommand = new RelayCommand(this.InsertProduct); this.refreshCommand = new RelayCommand(this.Refresh); }
public MainWindowViewModel(IProductManagementAgent agent, IWindow window) { if (agent == null) { throw new ArgumentNullException("agent"); } if (window == null) { throw new ArgumentNullException("window"); } this.agent = agent; this.window = window; this.products = new ObservableCollection<ProductViewModel>(); this.closeCommand = new RelayCommand(this.Close); this.deleteProductCommand = new RelayCommand(this.DeleteProduct, this.IsProductSelected); this.editProductCommand = new RelayCommand(this.EditProduct, this.IsProductSelected); this.insertProductCommand = new RelayCommand(this.InsertProduct); this.refreshCommand = new RelayCommand(this.Refresh); }