public void Search()
        {
            string product = "     스위치 ";
            string dummyName = "23094832098432";
            string somethingName = "버튼\t 단자부\n버섯\r 213o4u12oi\t";
            string specName = "KCB";

            var vm = new InventorySearchTextBoxViewModel();

            //제품 이름 검색
            vm.Text = product;
            var result = vm.Search();

            Assert.AreNotEqual(0, result.Count());
            Assert.IsTrue(result.All(x => x.Product.Name.Contains("스위치")));

            //더미로 검색하였을 때 검색 실패
            vm.Text = dummyName;
            result = vm.Search();

            Assert.AreEqual(0, result.Count());

            //여러개의 키워드를 넣었을 경우 or연산으로 쿼리
            vm.Text = somethingName;
            result = vm.Search();

            Assert.AreNotEqual(0, result.Count());
            foreach (var name in somethingName.Split(new char[] { ' ', '\t', '\r', '\n', }, StringSplitOptions.RemoveEmptyEntries))
            {
                Assert.IsTrue
                    (
                        result.Any(x => x.Product.Name.Contains("버튼")) ||
                        result.Any(x => x.Product.Name.Contains("단자부")) ||
                        result.Any(x => x.Product.Name.Contains("버섯"))
                    );
            }

            //규격으로 검색
            vm.Text = specName;
            result = vm.Search();

            Assert.AreNotEqual(0, result.Count());
            Assert.IsTrue(result.All(x => x.Product.Name.Contains("SWTICH")));
        }
        /// <summary>
        /// 초기화
        /// </summary>
        protected virtual void Initialize()
        {
            DataGridViewModel1 = new InventoryDataGridViewModel();
            DataGridViewModel2 = new InventoryDataGridViewModel();

            DataGridViewModel1.PropertyChanged += OnDataGridViewPropertyChanged;
            DataGridViewModel2.PropertyChanged += OnDataGridViewPropertyChanged;

            SearchViewModel = new InventorySearchTextBoxViewModel();
            SearchViewModel.SearchCommand = new RelayCommand<object>(ExecuteSearchCommand, (object obj) => { return true; });

            List<ObservableInventory> list = DataDirector.GetInstance().CopyInventories();
            PushDataGridItems(list, true);

            CanModify = false;
            ShowProductColumn = ShowMeasureColumn = ShowMakerColumn = true;

            TreeViewViewModel = new MultiSelectTreeViewModelView();
            TreeViewViewModel.PropertyChanged += OnTreeViewPropertyChanged;
        }