Ejemplo n.º 1
0
 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
 }
Ejemplo n.º 3
0
        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 MainWindowViewModelFactory(IProductManagementAgent agent)
        {
            if (agent == null)
            {
                throw new ArgumentNullException("agent");
            }

            this.agent = agent;
        }
        public ErrorHandlingProductManagementAgent(IProductManagementAgent agent)
        {
            if (agent == null)
            {
                throw new ArgumentNullException("agent");
            }

            this.innerAgent = agent;
        }
Ejemplo n.º 7
0
        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 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;
        }
Ejemplo n.º 9
0
        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);
        }