public void TestInitialize()
        {
            _template = new TemplateViewModel(new Template());
            _module   = new ModuleViewModel(new Module());
            UnitOfWork       unitOfWork     = new UnitOfWork(new ElogicSystemContext());
            ProductViewModel itemViewModel1 = new ProductViewModel(new Product()
            {
                ID = 1, Description = "TEST",
            });
            ProductViewModel itemViewModel2 = new ProductViewModel(new Product()
            {
                ID = 2, Description = "TEST2"
            });
            ProductViewModel itemViewModel3 = new ProductViewModel(new Product()
            {
                ID = 3, Description = "TEST2"
            });
            ModuleViewModel module1 = new ModuleViewModel(new Module());

            module1.Add(itemViewModel3);

            _template.Add(itemViewModel1);
            _template.Add(itemViewModel2);
            _template.Add(module1);
            _windowFactory    = new WindowFactoryMock();
            _windowService    = _windowFactory.GetWindowService(WindowType.PanelBuilderView);
            _builderViewModel = new BuilderViewModel(_windowService.Close, _windowFactory, _template, _module, unitOfWork);
        }
        public void TestInitialize()
        {
            _module = new ModuleViewModel(new Module());
            ProductViewModel itemViewModel1 = new ProductViewModel(new Product()
            {
                ID = 1, Description = "TEST",
            });
            ProductViewModel itemViewModel2 = new ProductViewModel(new Product()
            {
                ID = 2, Description = "TEST2"
            });

            _module.Add(itemViewModel1);
            _module.Add(itemViewModel2);

            _block = new BlockViewModel(new Block());
            _block.Add(_module);
            _items = new ObservableCollection <ItemViewModel>();

            _hierarchyDataGrid = new HierarchyDataGrid(_items);
        }
Example #3
0
        public void TestInitialize()
        {
            ProductViewModel product1 = new ProductViewModel(new Model.Product());
            ProductViewModel product2 = new ProductViewModel(new Model.Product());
            ModuleViewModel  module   = new ModuleViewModel(new Model.Module());

            module.Add(product1);
            module.Add(product2);

            HierarchyDataGrid hierarchyDataGrid = new HierarchyDataGrid(new ObservableCollection <ItemViewModel>());

            hierarchyDataGrid.Add(module);
            _dataGridItemModule = hierarchyDataGrid.DataGridItems[0];
            hierarchyDataGrid.Remove(module);

            BlockViewModel block = new BlockViewModel(new Model.Block());

            block.Add(module);
            hierarchyDataGrid.Add(block);

            _dataGridItemBlock = hierarchyDataGrid.DataGridItems[0];
        }