public void ScriptDesignerViewModel_Constructor_PropertiesInitialized()
        {
            var modelItem = CreateModelItem();
            var viewModel = new TestPythonDesignerViewModel(modelItem);

            Assert.IsTrue(viewModel.EscapeScript);
            Assert.IsTrue(viewModel.HasLargeView);
        }
        public void ScriptDesignerViewModel_SelectedScriptType_Python_PropertiesInitialized()
        {
            var modelItem = CreateModelItem();
            var viewModel = new TestPythonDesignerViewModel(modelItem);

            Assert.IsTrue(viewModel.EscapeScript);
            Assert.AreEqual("Python Syntax", viewModel.ScriptTypeDefaultText);
        }
        public void ScriptDesignerViewModel_ChooseDirectoryShould_ReturnFile()
        {
            var modelItem = CreateModelItem();
            var viewModel = new TestPythonDesignerViewModel(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));
        }