Ejemplo n.º 1
0
        public void ScriptDesignerViewModel_ChooseDirectoryShould_ReturnFile()
        {
            var modelItem = CreateModelItem();
            var viewModel = new TestJavaScriptDesignerViewModel(modelItem);

            Assert.IsTrue(string.IsNullOrEmpty(viewModel.IncludeFile));
            viewModel.IncludeFile = GetJsTmpFile();
            viewModel.Validate();
            var command = new DelegateCommand(o => viewModel.ChooseScriptSources());

            Assert.IsTrue(viewModel.ChooseScriptSourceCommand.CanExecute(command));
            viewModel.ChooseScriptSourceCommand.Execute(command);
            Assert.IsFalse(string.IsNullOrEmpty(viewModel.IncludeFile));
        }