Exemplo n.º 1
0
        private void CreateNewProject_OnClick(object sender, RoutedEventArgs e)
        {
            string         selectedLanguage = "C#"; // Currently, only support C#
            OutputLanguage outputLanguage   = _projectEditorViewModel.OutputLanguages.First(ol => ol.Name == selectedLanguage);

            _projectEditorViewModel.StartNewProject(outputLanguage);
        }
Exemplo n.º 2
0
        private static ProjectEditorViewModel CreateCSharpProjectEditorViewModel()
        {
            ProjectEditorViewModel vm = new ProjectEditorViewModel();

            vm.StartNewProject(OutputLanguageFactory.GetLanguages().First(x => x.Name == "C#"));

            return(vm);
        }
Exemplo n.º 3
0
        public void Test_StartNewProject()
        {
            ProjectEditorViewModel vm = new ProjectEditorViewModel();

            OutputLanguage outputLanguage = vm.OutputLanguages.First(ol => ol.Name == "C#");

            vm.StartNewProject(outputLanguage);

            // Assertions
            vm.CurrentProject.ShouldNotBeNull();
            vm.CurrentProject.Datatypes.Count.ShouldBe(17);
        }