public void WhenRefreshItemsWillCallViewModel()
        {
            var hasBeenCalled = false;
            var viewModel = new StubIItemEditorViewModel
            {
                RefreshItemsList = () => hasBeenCalled = true
            };

            SetupClass(viewModel).RefreshItems();

            Assert.IsTrue(hasBeenCalled);
        }
        public void WhenClosingItWillSaveItems()
        {
            var hasBeenCalled = false;
            var itemEditorViewModel = new StubIItemEditorViewModel
            {
                SaveItems = () => hasBeenCalled = true
            };

            var itemEditorClosingHandler = new ItemEditorClosingHandler(itemEditorViewModel);

            itemEditorClosingHandler.OnWindowClosing(null, null);

            Assert.IsTrue(hasBeenCalled);
        }
        public void DataContextWillBeInputViewModel()
        {
            var viewModel = new StubIItemEditorViewModel();

            Assert.AreEqual(viewModel, SetupClass(viewModel).DataContext);
        }